Unable to process file command 'env' successfully.
greggjensencart opened this issue · 3 comments
greggjensencart commented
It appears you can no longer set KUBE_CONFIG_DATA
as a single line string or you will get the following error:
Unable to process file command 'env' successfully.
In order for it to work properly, you must update the following
- name: kubeconfing
run: |
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.AWS_REGION }}
echo "KUBE_CONFIG_DATA=$(cat ~/.kube/config | base64)" >> $GITHUB_ENV
To use the multiline syntax
- name: kubeconfing
run: |
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.AWS_REGION }}
echo 'KUBE_CONFIG_DATA<<EOF' >> $GITHUB_ENV
echo $(cat ~/.kube/config | base64) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
Please update your example documentation as you have time.
koslib commented
Hello, thanks for letting me know! Would you like to submit a PR for this? Otherwise I'll fix it as soon as possible!
hvpareja commented
What a coincidence, I was experiencing the same issue at the same time when this issue was posted. Thanks @greggjensencart !!
miparnisari commented
FYI, I have this code
- name: helm setup
uses: koslib/helm-eks-action@master
with:
command: |
aws eks update-kubeconfig --region ${{ secrets.AWS_REGION }} --name ${{ secrets.CLUSTER }}
echo 'KUBE_CONFIG_DATA<<EOF' >> $GITHUB_ENV
echo $(cat $HOME/.kube/config | base64) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
and it gives me
cat: can't open '/github/home/.kube/config': No such file or directory
The below works :D
aws eks update-kubeconfig --region ${{ secrets.AWS_REGION }} --name ${{ secrets.CLUSTER }} --kubeconfig ./kubeconfig
echo 'KUBE_CONFIG_DATA<<EOF' >> $GITHUB_ENV
echo $(cat ./kubeconfig | base64) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV