Provides kubectl
for GitHub Actions.
.github/workflows/push.yml
on: push
name: deploy
jobs:
deploy:
name: deploy to cluster
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: deploy to cluster
uses: tinybeans/[email protected]
config: ${{ secrets.KUBE_CONFIG_DATA }}
command: set image --record deployment/my-app container=${{ github.repository }}:${{ github.sha }}
# version: defaults to latest
- name: verify deployment
uses: tinybeans/[email protected]
with:
config: ${{ secrets.KUBE_CONFIG_DATA }}
command: rollout status deployment/my-app
version: v1.21.0 # explicit version
command
– required: Command you want to run, e.g. get pods
config
– required: A base64-encoded kubeconfig file with credentials for Kubernetes to access cluster. Get it by running the following command:
cat $HOME/.kube/config | base64
version
: kubectl version with a 'v' prefix, e.g. v1.21.0
. Defaults to latest kubectl version.
Note: Do not use kubectl config view as this will hide certificate-authority-data.