-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69395be
commit ce0afcf
Showing
8 changed files
with
25 additions
and
104 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,13 @@ Provides `kubectl` command to GitHub Actions. | |
|
||
## Why? | ||
|
||
Mainly because we need to be sure that our kubeconfig won't leak to third parties :-) We control the code, we know there are no (and there will be no) backdoors. | ||
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. `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 | ||
|
||
|
@@ -22,15 +28,15 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Deploy to cluster | ||
uses: myrotvorets/[email protected] | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
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] | ||
env: | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
uses: myrotvorets/[email protected] | ||
with: | ||
config: ${{ secrets.KUBE_CONFIG_DATA }} | ||
version: latest | ||
args: rollout status deployment/application | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
name: run-kubectl | ||
author: Myrotvorets | ||
description: kubectl as a GitHub Action | ||
inputs: | ||
config: | ||
required: true | ||
description: BASE64-encoded kubeconfig | ||
version: | ||
default: latest | ||
required: false | ||
description: kubectl version (1.18, 1.19, 1.20, 1.21, latest) | ||
runs: | ||
using: docker | ||
image: Dockerfile | ||
image: docker://myrotvorets/kubectl-action:latest | ||
env: | ||
KUBECTL_VERSION: ${{ inputs.version }} | ||
KUBE_CONFIG_DATA: ${{ inputs.config }} | ||
branding: | ||
icon: terminal | ||
color: blue |
This file was deleted.
Oops, something went wrong.