Skip to content

Commit

Permalink
feat: add support for different kubectl versions (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsn723 authored and steebchen committed Dec 25, 2019
1 parent 0674d56 commit d8fd5c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
```
Expand All @@ -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.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}} $*"

0 comments on commit d8fd5c9

Please sign in to comment.