ci: package release charts with the tag's version, pin actions by SHA, add Dependabot
Merged
JE
2d ago+134+134+012345678901234567890123456789-47-47-01234567890123456789
Description
Release-engineering fixes found while releasing v1.9.2 and v1.10.0-alpha.1, in four commits:
- Release charts are packaged as
0.1.0.go-release.ymlset the chart versions in theenvjob, but each
job has its own checkout, so thereleasejob packaged the charts as0.1.0, and their default image (the
templates usev<chart version>) wasoamdev/cluster-gateway:v0.1.0. The step now runs inrelease, before
helm package, and fails if a version wasn't set. - Actions on old majors, unpinned. Several actions were majors behind (
checkout@v3,metadata-action@v4,
build-push-action@v4,setup-helm@v1, …; actionlint reports five of them as too old to run), and most were
referenced by a moving tag. Every action is now pinned by commit SHA at its current major (a release at least two
weeks old), with the version in a comment, and the runners areubuntu-24.04. One behaviour change to note:
skip-duplicate-actionsv5 fails, instead of reporting "don't skip", when the GitHub API errors, so the step has
continue-on-error: true(as its release notes recommend);concurrent_skippingtakes'never'instead offalse. - Dependabot keeps those pins and the Dockerfiles' base-image digests current: one grouped PR a week per branch
(master,release-1.10,release-1.9) for the actions, and one for the base images, limited to new digests and
patch versions (a new Alpine or Go minor stays a deliberate change on each branch). setup-envtestpinned to the branch's controller-runtime release.setup-gov6+ runs with
GOTOOLCHAIN=local, sogo install …/setup-envtest@latestfails whenlatestneeds a newer Go than the branch
(today onrelease-1.9: v0.25.3 requires Go 1.26).masteruses@release-0.25(controller-runtime v0.25.2 in
go.mod).
I have:
- Signed off the commits (DCO).
How has this been tested
On my fork, with the images redirected to my GHCR, master, release-1.10 and release-1.9 set up as they will be
here:
| Check | Result |
|---|---|
| CI on a push to each branch | green: unit tests, gateway e2e, OCM addon e2e |
| BuildImage on a branch push | :<branch> and :<branch>-<sha> only |
Tags v1.9.2 / v1.10.0-alpha.1 | BuildImage and GoRelease green; latest moved for v1.9.2 only; addon-manager for amd64 + arm64 |
| Release charts | cluster-gateway-1.9.2.tgz / cluster-gateway-addon-manager-1.9.2.tgz with version: 1.9.2, rendering oamdev/cluster-gateway:v1.9.2 (and the same for 1.10.0-alpha.1); before: 0.1.0, :v0.1.0 |
| Dependabot | config accepted; PRs on each branch: base images digest / patch only, actions kept pinned by SHA |
Without commit 4, release-1.9's unit-test job fails at setup-envtest (reproduced in golang:1.23 with
GOTOOLCHAIN=local).
Special notes for your reviewer
- I'll cherry-pick commits 1, 2 and 4 to
release-1.10(clean) andrelease-1.9(its own Go and kind versions;
setup-envtest@release-0.19). Dependabot's config only needs to be onmaster. - Dependabot's commits have no
Signed-off-by; if the DCO check covers bot commits, its PRs will need it overridden. - Once Dependabot runs, its first PRs will bump
setup-helmto v5.1.0 andlogin-actionto v4.8.0 (released in the
last two weeks, so not taken here).
Summary by cubic
Release charts now carry the tag's version instead of 0.1.0, and the release CI is hardened: actions are pinned by SHA at their current majors, Dependabot keeps them that way, and setup-envtest is pinned so it builds on the branch's Go toolchain.
Bug Fixes
- The
releasejob rewrites each chart'sversionto the trimmed tag (e.g.1.9.2) beforehelm package, so the chart's default image (v<chart version>) matches this release.
Refactors
- All GitHub Actions are pinned by commit SHA at their current majors, with the version in a comment; runners are
ubuntu-24.04. - Dependabot opens one grouped PR a week per branch (
master,release-1.10,release-1.9) for actions and base-image digest/patch updates. setup-envtestis installed from the controller-runtime release ingo.modinstead of@latest, sincesetup-goruns withGOTOOLCHAIN=localand@latestmay require a newer Go.skip-duplicate-actionsv5 fails instead of reporting "don't skip" when the GitHub API errors, so that step now hascontinue-on-error: true.