A Github Action for executing Helm commands on EKS using the AWS CLI.
It can also run AWS, kubeclt and SOPs commands.
This action was inspired by helm-eks-action. We've adapted the action to allow for more granular control over the package versions installed.
Use this as a Github Action step as follows:
- You have to authenticate against an AWS account to be able to access an EKS.
name: deploy
on:
push:
branches:
- staging
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: helm deploy
uses: birdiecare/helm-eks-action@v2
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
with:
repos: |
stable https://charts.helm.sh/stable
plugins: |
https://github.com/jkroepke/[email protected]
command: |
helm secrets upgrade <release name> --install --wait <chart> -f <path to values.yaml>
Create a GitHub Secret for each of the following values:
-
KUBE_CONFIG_DATA
Your kube config file in base64-encoded form. You can do that with
cat $HOME/.kube/config | base64
-
AWS_ACCESS_KEY_ID
-
AWS_SECRET_ACCESS_KEY
Input | Description | Example |
---|---|---|
command | The command to be executed | sh ./scripts/deploy.sh |
repos | The repos to add | stable https://charts.helm.sh/stable |
plugins | The plugins to install | https://github.com/jkroepke/[email protected] |