Skip to content

tinybeanskids/kubectl-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action for Kubernetes CLI

Provides kubectl for GitHub Actions.

Usage

.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

Arguments

commandrequired: Command you want to run, e.g. get pods

configrequired: 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published