Repository navigation
Conversation
make lint sets Chart.yaml and the README install command from the latest stable tag, and fails if they changed. A tag cannot contain its own version, so main fails lint after every release until someone commits the sync. Add a sync-version job to the publish-helm workflow. It runs after the release job succeeds, runs make readme on main, and opens a pull request with the result. It does nothing when the files already match, for example after a prerelease tag. Remove the two TODO comments in the Makefile that this replaces.
jtslear
force-pushed
the
skarbek/automate-chart-version-sync
branch
from
October 16, 2026 15:04
37d1daa to
508793b
Compare
Contributor
Author
|
@dannykopping what do you think of this? Note that I do not have permissions to adjust settings on this Repo, so I cannot validate if this would work until GHA settings are modified. Currently in draft due to lack of permissions for actual testing. |
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
Add a
sync-versionjob to thepublish-helmrelease workflow. After a successful release it runsmake readmeonmainand opens a pull request that commits the newChart.yamlversion and README install command.This should be done as part of the tag procedure since what is published in
mainhas then diverged from our latest tag. This procedure adds this capability with manual actions post tag. So we're getting closer.Requested in #95 (comment) . This replaces the two
TODO: auto-update chart version ...comments in theMakefile.Why
make lintsetsChart.yamland the README from the latest stable tag, then fails if a file changed. A tag cannot contain its own version, somainfailslintafter every release until someone commits the sync. That happened afterv0.8.0(#95).How it works
needs: release: nothing runs if publishing fails.main(not the tag), fetches tags, runsmake readmewith the same Go, Helm and yq versions as theLintworkflow.peter-evans/create-pull-requestopenschore/sync-chart-versionagainstmain, limited tocoder-observability/Chart.yamlandREADME.md. It does nothing when there is no change, for example after a prerelease tag. It updates the branch if a sync PR is still open.Test
The workflow cannot run without publishing, so I ran its steps in a clean clone of
mainbefore #95, with helm 3.17.4 and yq 4.42.1:make readmeon stalemain, tagv0.8.0Chart.yaml, README install command)v0.9.0-rc1version.sh -sstill0.8.0actionlintreports only the two errors thatrelease.yamlalready has onmain(steps.version,inputs.dry_run). Not tested: thecreate-pull-requeststep, theGITHUB_TOKENpermissions and the repository setting that lets Actions open pull requests.Needs a decision