feat: add support for different kubectl versions (#4)

This commit is contained in:
Antoine
2019-12-25 18:23:48 +01:00
committed by Luca Steeb
parent 0674d56d2d
commit d8fd5c9f17
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -26,6 +26,7 @@ jobs:
uses: steebchen/kubectl@master
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
KUBECTL_VERSION: "1.15"
with:
args: '"rollout status deployment/my-app"'
```
@@ -38,4 +39,8 @@ jobs:
cat $HOME/.kube/config | base64
```
## Environment
`KUBECTL_VERSION` - (optional): Used to specify the kubectl version. If not specified, this defaults to kubectl 1.13
**Note**: Do not use kubectl config view as this will hide the certificate-authority-data.
+1 -1
View File
@@ -6,4 +6,4 @@ set -e
echo "$KUBE_CONFIG_DATA" | base64 --decode > /tmp/config
export KUBECONFIG=/tmp/config
sh -c "kubectl $*"
sh -c "kubectl${KUBECTL_VERSION:+.${KUBECTL_VERSION}} $*"