Skip to main content

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

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