Skip to content

ci: open a pull request that syncs the chart version after a release - #96

Draft
jtslear wants to merge 1 commit into
mainfrom
skarbek/automate-chart-version-sync
Draft

jtslear wants to merge 1 commit into
mainfrom
skarbek/automate-chart-version-sync

Conversation

@jtslear

@jtslear jtslear commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a sync-version job to the publish-helm release workflow. After a successful release it runs make readme on main and opens a pull request that commits the new Chart.yaml version and README install command.

This should be done as part of the tag procedure since what is published in main has 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 the Makefile.

Why

make lint sets Chart.yaml and the README from the latest stable tag, then fails if a file changed. A tag cannot contain its own version, so main fails lint after every release until someone commits the sync. That happened after v0.8.0 (#95).

How it works

  • needs: release: nothing runs if publishing fails.
  • Checks out main (not the tag), fetches tags, runs make readme with the same Go, Helm and yq versions as the Lint workflow.
  • peter-evans/create-pull-request opens chore/sync-chart-version against main, limited to coder-observability/Chart.yaml and README.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 main before #95, with helm 3.17.4 and yq 4.42.1:

case result
make readme on stale main, tag v0.8.0 exactly the two-line diff in #95 (Chart.yaml, README install command)
rerun after committing no changes
extra prerelease tag v0.9.0-rc1 no changes, version.sh -s still 0.8.0

actionlint reports only the two errors that release.yaml already has on main (steps.version, inputs.dry_run). Not tested: the create-pull-request step, the GITHUB_TOKEN permissions and the repository setting that lets Actions open pull requests.

Needs a decision

  • Setting: Settings > Actions > General > Allow GitHub Actions to create and approve pull requests must be on, or the last step fails. I could not read this setting.

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
jtslear force-pushed the skarbek/automate-chart-version-sync branch from 37d1daa to 508793b Compare October 16, 2026 15:04
@jtslear

jtslear commented Oct 16, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant