See plattform-examples for a real-world example.
Add the following step to your workflow configuration:
jobs:
helm-deploy:
name: Helm Deploy
uses: entur/gha-helm/.github/workflows/deploy.yml@v1
with:
environment: dev
image: amazing-app:latest
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
chart | string | false | "repo_name" |
The chart, defaults to helm/$repository_name |
cloud_provider | string | false | "gcp" |
Which cloud service provider to use - Google Cloud: 'gcp' or Azure: 'az' |
environment | string | true | GitHub environment to use Google Cloud: (dev, tst, prd) or Azure: (az-dev, az-test, az-prod) |
|
gcp_cluster_location | string | false | "europe-west1" |
Defaults to europe-west1 |
gcp_cluster_name | string | false | Do not use this input | |
gcp_project_id | string | false | Do not use this input | |
git_ref | string | false | Git reference to check out before deployment. This can be used as an override if necessary |
|
image | string | true | The image to deploy, on the form app:tag. Use na value to skip replacing the image version in the helm config. |
|
namespace | string | false | "repo_name" |
The namespace to use, defaults to repository name |
release_name | string | false | "repo_name" |
The release name, defaults to repository name |
timeout_minutes | number | false | 30 |
Job timeout in minutes. Helm deploy timeout is half of this value to enable rollback. Default is 30 minutes. |
values | string | false | "values" |
The values file in ./helm/$app/env/ , default $environment.yaml |
OUTPUT | VALUE | DESCRIPTION |
---|---|---|
HELM_DEPLOY_STATUS | "${{ jobs.helm-deploy.outputs.HELM_DEPLOY_STATUS }}" |
Helm Deploy Status 0: Success, 1: Failed, 2: Rollback, 3: Rollback Failed |