Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myrotvorets/kubectl-action
kubectl as a GitHub Action
https://github.com/myrotvorets/kubectl-action
github-actions kubectl kubectl-action
Last synced: 4 days ago
JSON representation
kubectl as a GitHub Action
- Host: GitHub
- URL: https://github.com/myrotvorets/kubectl-action
- Owner: myrotvorets
- License: mit
- Created: 2020-12-22T23:57:34.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T17:27:33.000Z (about 1 year ago)
- Last Synced: 2024-12-16T20:36:07.965Z (7 days ago)
- Topics: github-actions, kubectl, kubectl-action
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubectl-action
Provides `kubectl` command to GitHub Actions.
## Why?
Mainly because we need to be sure that our `kubeconfig` will not leak to third parties :-) We control the code, and we know there are no (and there will be no) backdoors.
## Parameters
* `config`: base64-encoded `kubeconfig` (**required**);
* `version`: kubectl version, defaults to `latest`. Supported versions: 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24. `latest` is aliased to the latest available version. See: [Kubernetes version skew policy](https://kubernetes.io/docs/setup/release/version-skew-policy/#kubectl);
* `args`: parameters passed to `kubectl`.## Usage
```yaml
name: Deploy
on:
push:
branches:
- masterjobs:
deploy:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2
- name: Deploy to cluster
uses: myrotvorets/[email protected]
with:
config: ${{ secrets.KUBE_CONFIG_DATA }}
version: latest
args: set image --record deployment/application container=${{ github.repository }}:${{ github.sha }}
- name: Verify deployment
uses: myrotvorets/[email protected]
with:
config: ${{ secrets.KUBE_CONFIG_DATA }}
version: latest
args: rollout status deployment/application
```