Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed May 12, 2021
1 parent 69395be commit ce0afcf
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 104 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

18 changes: 0 additions & 18 deletions .github/problem-matcher-gcc.json

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/build-image.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/shellcheck.yml

This file was deleted.

4 changes: 0 additions & 4 deletions Dockerfile

This file was deleted.

20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
```
13 changes: 12 additions & 1 deletion action.yml
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
14 changes: 0 additions & 14 deletions entrypoint.sh

This file was deleted.

0 comments on commit ce0afcf

Please sign in to comment.