This is an git repo that exposes the https://charts.validatedpatterns.io helm repository.
The way it works is the following:
-
A remote repository will tag a chart and the tagging will invoke a workflow here in the helm-charts repository
-
The workflow in the remote repository will trigger a workflow here like the following:
gh workflow run publish-charts.yml \ --repo validatedpatterns/helm-charts \ --ref main \ -f SOURCE_TAG="${{ github.ref_name }}" \ -f SOURCE_REPO="${{ github.repository }}"
-
The publish-charts workflow will pull the SOURCE_REPO and SOURCE_TAG, handle any helm chart dependencies, build the helm package, sign it and update the yaml index
The publish-charts.yml workflow supports the following inputs:
- SOURCE_TAG (required): The tag of the helm chart repo to build
- SOURCE_REPO (required): The helm chart repo in
owner/repoformat - SOURCE_BRANCH_OVERRIDE (optional): If specified, checks out the head of this branch rather than the commit tagged by SOURCE_TAG
- TEMPLATE_DIR (optional): Directory containing the helm chart (relative to repo root). If not specified, will auto-detect Chart.yaml location by looking in common locations (., chart/, helm/)
The workflow automatically handles helm chart dependencies declared in Chart.yaml:
- Auto-detecting chart location: Looks for
Chart.yamlin common locations (.,chart/,helm/) ifTEMPLATE_DIRis not specified - Registering repositories: Extracts repository URLs from
Chart.yamldependencies and registers them withhelm repo add - Building dependencies: Runs
helm dependency buildto download all declared dependencies into thecharts/directory - Bundling:
helm packageproduces a.tgzthat includes the chart and all its dependencies
All chart dependencies must be declared in Chart.yaml with valid repository URLs.
gh workflow run publish-charts.yml \
--repo validatedpatterns/helm-charts \
--ref main \
-f SOURCE_TAG="${{ github.ref_name }}" \
-f SOURCE_REPO="${{ github.repository }}" \
-f TEMPLATE_DIR="helm-chart"- The remote repo must have a correct token set in the CHARTS_REPOS_TOKEN secret for the repository
- All required helm repositories must be specified in the
Chart.yamldependencies with complete URLs (e.g.,https://charts.bitnami.com/bitnami)