feat(publish-helm-chart): reusable workflow for chartmuseum publish#102
Merged
sydorovdmytro merged 1 commit intomainfrom Apr 15, 2026
Merged
feat(publish-helm-chart): reusable workflow for chartmuseum publish#102sydorovdmytro merged 1 commit intomainfrom
sydorovdmytro merged 1 commit intomainfrom
Conversation
unifies four chart publish call sites (vcluster release + head, loft-enterprise release + head) into one reusable workflow: - chart.yaml name + description applied via yq, --app-version via helm package - per-version helm package + helm cm-push, derived tarball filenames - optional values-edits for jsonpath=value tweaks (loft-enterprise .product) - optional republish-latest for the loft-enterprise release index-ordering hack - logic in run.sh + bats tests, yaml is glue only renovate customManager extended to pick up `# renovate:` annotations on default/version inputs in any workflow file (covers helm + yq pins).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 4.3 of the workflow centralization effort. Extracts four chart publish call sites into a single reusable workflow:
publish-chart.yaml(release)publish-helm-chart/v1push-head-images.yaml(head)publish-helm-chart/v1release-package.yaml(release, dual-product matrix)publish-helm-chart/v1push-head-images.yaml(head)publish-helm-chart/v1Design
Unified algorithm: yq Chart.yaml (name + optional description),
helm packageper version with optional--app-version,helm cm-pushper tarball. Two optional knobs cover the only meaningful divergence between callers:values-edits— newline-separatedjsonpath=valuepairs applied to<chart>/values.yaml(loft-enterprise sets.product)republish-latest— re-pull + re-push the repo's highest semver after the initial push, so it stays first in ChartMuseum's upload-orderedindex.yaml(loft-enterprise multi-line release behavior)YAML is glue only; logic lives in
run.shwith shellcheck-clean source and bats coverage. Same pattern ascleanup-head-chartsand the in-flightgo-licensesPR.What's covered by tests
24 bats tests stub
helmand run realmikefarah/yq+jq:--app-versionCI test workflow (
test-publish-helm-chart.yaml) installs mikefarah yq and runs bats.Renovate
Existing github-actions manager handles all SHA-pinned actions (checkout, setup-helm, install-yq-action, bats-action) via the
# vX.Y.Zcomment.For the inline default values that aren't actions (helm version default, yq version), I added a generic regex
customManagerthat picks up any# renovate: datasource=X depName=Yannotation in workflow YAML — applied to:inputs.helm-version.default: v3.20.0(datasourcegithub-releases, depNamehelm/helm)version: v4.45.1for yq in both publish-helm-chart.yaml and test-publish-helm-chart.yaml (datasourcegithub-releases, depNamemikefarah/yq)Helm-push plugin install matches existing convention (unpinned, tracks latest) — pinning is an orthogonal improvement.
Migration
Once tagged
publish-helm-chart/v1, follow-up PRs will:publish-chart.yamland inlinepush-head-chartjobpublish-chartjob (matrix preserved at caller level) and inlinepush-head-chartjobTest plan
publish-helm-chart/v1after merge