Skip to main content

GitHub Action: deploy-helmfile

Deploy on Kubernetes with HelmFile

Introduction

Deploy on Kubernetes with HelmFile.

Usage

Deploy environment

  name: github-action-deploy-helmfile
on:
pull_request:
branches: [ 'main' ]
types: [opened, synchronize, reopened]

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-action-deploy-helmfile
url: ${{ steps.deploy.outputs.webapp-url }}
steps:

- name: github-action-deploy-helmfile
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: github-action-deploy-helmfile

- name: github-action-deploy-helmfile
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: github-action-deploy-helmfile
on:
pull_request:
branches: [ 'main' ]
types: [closed]

jobs:
destroy:
runs-on: ubuntu-latest
steps:
- name: github-action-deploy-helmfile
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: github-action-deploy-helmfile

- name: github-action-deploy-helmfile
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

NameDescriptionDefaultRequired
aws-regionAWS regionus-east-1false
chamber_versionKubectl version2.11.1false
clusterCluster nameN/Atrue
debugDebug modefalsefalse
environmentHelmfile environmentpreviewfalse
gitref-shaGit SHAfalse
helm_versionHelm version3.11.1false
helmfileHelmfile namehelmfile.yamlfalse
helmfile-pathThe path where lives the helmfile.deployfalse
helmfile_versionHelmfile version0.143.5false
imageDocker imageN/Atrue
image-tagDocker image tagN/Atrue
kubectl_versionKubectl version1.26.3false
namespaceKubernetes namespaceN/Atrue
operationOperation with helmfiles. (valid options - deploy, destroy)deploytrue
release_label_nameThe name of the label used to describe the helm releasereleasefalse
values_yamlYAML string with extra values to use in a helmfile deployN/Afalse

Outputs

NameDescription
webapp-urlWeb Application url