GitHub Action: deploy-helmfile
Deploy on Kubernetes with HelmFile
Introduction
Deploy on Kubernetes with HelmFile.
Usage
Deploy environment
name: Pull Request
on:
pull_request:
branches: [ 'main' ]
types: [opened, synchronize, reopened]
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: preview
url: ${{ steps.deploy.outputs.webapp-url }}
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-[email protected]
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::111111111111:role/preview
role-session-name: deploy
- name: Deploy
uses: cloudposse/github-action-deploy-helmfile@main
id: deploy
with:
aws-region: us-west-2
cluster: preview-eks
environment: preview
namespace: preview
image: nginx
image-tag: latest
operation: deploy
debug: false
Destroy environment
name: Pull Request
on:
pull_request:
branches: [ 'main' ]
types: [closed]
jobs:
destroy:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-[email protected]
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::111111111111:role/preview
role-session-name: destroy
- name: Destroy
uses: cloudposse/github-action-deploy-helmfile@main
id: destroy
with:
aws-region: us-west-2
cluster: preview-eks
environment: preview
namespace: preview
image: "<none>"
image-tag: "<none>"
operation: destroy
debug: false
Inputs
Name | Description | Default | Required |
---|---|---|---|
aws-region | AWS region | us-east-1 | false |
chamber_version | Kubectl version | 2.11.1 | false |
cluster | Cluster name | N/A | true |
debug | Debug mode | false | false |
environment | Helmfile environment | preview | false |
gitref-sha | Git SHA | false | |
helm_version | Helm version | 3.11.1 | false |
helmfile | Helmfile name | helmfile.yaml | false |
helmfile-path | The path where lives the helmfile. | deploy | false |
helmfile_version | Helmfile version | 0.143.5 | false |
image | Docker image | N/A | true |
image-tag | Docker image tag | N/A | true |
kubectl_version | Kubectl version | 1.26.3 | false |
namespace | Kubernetes namespace | N/A | true |
operation | Operation with helmfiles. (valid options - deploy , destroy ) | deploy | true |
release_label_name | The name of the label used to describe the helm release | release | false |
values_yaml | YAML string with extra values to use in a helmfile deploy | N/A | false |
Outputs
Name | Description |
---|---|
webapp-url | Web Application url |