github请确保/home/action/azure-kubectl在您的搜索路径中
使用以下行安装kubectl和
- id: install-aks-cli
run: |
az aks install-cli --install-location ${{ inputs.kube-ctl-install-location }} --kubelogin-install-location ${{ inputs.kube-login-install-location }}
echo "$PATH"
export PATH="/home/actions/azure-kubectl:$PATH"
export PATH="/home/actions/azure-kubelogin:$PATH"
echo "$PATH"
echo "Installed AKS CLI Tools - KubeLogin and KubeCTL"
shell: bash
kubelogin
/home/actions/runner-state/_work/_temp/17d9e0a3-3af9-49c4-8c59-b95a7f4271e2.sh: line 1: kubelogin: command not found
在
/home/actions/azure-kubelogin:/home/actions/azure-kubectl:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
后其他系统路径?
我也尝试了以下内容,没有运气,
echo "/home/actions/azure-kubectl" >> GITHUB_PATH
感谢您对如何执行此操作的任何建议。我的跑步者正在使用Linux
After installing KubeCTL and KubeLogin using the following line
- id: install-aks-cli
run: |
az aks install-cli --install-location ${{ inputs.kube-ctl-install-location }} --kubelogin-install-location ${{ inputs.kube-login-install-location }}
echo "$PATH"
export PATH="/home/actions/azure-kubectl:$PATH"
export PATH="/home/actions/azure-kubelogin:$PATH"
echo "$PATH"
echo "Installed AKS CLI Tools - KubeLogin and KubeCTL"
shell: bash
I keep getting the following error when trying this action out
/home/actions/runner-state/_work/_temp/17d9e0a3-3af9-49c4-8c59-b95a7f4271e2.sh: line 1: kubelogin: command not found
When i look at the paths i see the following
/home/actions/azure-kubelogin:/home/actions/azure-kubectl:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
It seems to me i am adding the strings toogether and just replacing the existing as opposed to appending an additional system path?
I've also tried the following and had no luck
echo "/home/actions/azure-kubectl" >> GITHUB_PATH
Appreciate any advice on how to do this. My runner is using linux
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改路径(或任何其他环境变量)对随后在新外壳中运行的步骤没有影响。您需要通过
$ github_path
来操纵那些路径:请注意,默认值为
〜/.azure-kubectl/
Changing the PATH (or any other environment variable) has no effect on subsequent steps as they run in new shells. You need to manipulate the PATH for those via
$GITHUB_PATH
like this:Note that the default is
~/.azure-kubectl/