mirror of
https://github.com/wahyd4/kubectl.git
synced 2026-08-09 05:06:58 +10:00
feat: add support for different kubectl versions (#4)
This commit is contained in:
@@ -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
@@ -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}} $*"
|
||||
|
||||
Reference in New Issue
Block a user