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/repo
format -
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/)
-
ADDITIONAL_HELM_REPOS (optional): Additional helm repositories to add in JSON format, e.g.:
[{"name":"myrepo","url":"https://example.com/charts"}]
The workflow automatically handles helm chart dependencies by:
- Auto-detecting chart location: Looks for Chart.yaml in common locations if TEMPLATE_DIR is not specified
- Discovering required repositories: Automatically extracts repository URLs from Chart.yaml dependencies and adds them as helm repositories
- Smart repository naming: Converts repository URLs to names by removing the protocol (https://) and common prefixes
- Adding custom repositories: Processes any additional repositories specified in ADDITIONAL_HELM_REPOS
- Intelligent dependency checking: Checks if chart dependencies already exist in the charts/ directory and skips downloading if all dependencies are present
- Selective dependency updates: Only runs
helm dependency update
when missing dependencies are detected - Verification: Confirms dependencies were successfully downloaded or reports existing charts
This intelligent approach improves build performance by avoiding unnecessary dependency downloads when charts are already cached in the repository.
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" \
-f ADDITIONAL_HELM_REPOS='[{"name":"mycompany","url":"https://charts.mycompany.com"}]'
- The remote repo must have a correct token set in the CHARTS_REPOS_TOKEN secret for the repository
- If using dependencies, ensure all required helm repositories are properly specified in the Chart.yaml dependencies with valid repository URLs, or included in ADDITIONAL_HELM_REPOS
- Repository URLs in dependencies should be complete URLs (e.g.,
https://charts.bitnami.com/bitnami
)