A GitHub Action for templating one or more Flux CD HelmRelease resources. It parses the Helm chart repository, chart name, chart version, and values and passes those to helm template for rendering. The most common use case is to render the full resources so they can be checked with conftest or another static analysis tool in a later step in the CI job.
If a directory is specified for the hr-path option, it will be recursively searched for HelmRelease resources and each located HelmRelease will be templated. The format of the output filename is ${INSTALL_NAMESPACE}_${RELEASE_NAME}_${CHART_NAME}_${CHART_VER}.yaml.
| Option | Description | Default | Required |
|---|---|---|---|
| hr-path | Path to the HelmRelease file or directory | yes | |
| out-dir | Path to the directory to write the outputs | . | no |
| continue-on-error | Whether to continue templating if an error occurrs with one template | false | no |
name: template-helmrelease
on: [pull_request]
jobs:
hr-template:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: template
uses: YubicoLabs/action-template-helmrelease@v2
with:
hr-path: your-helmrelease.yaml