ci: package release charts with the tag's version, pin actions by SHA, add Dependabot

Merged
JE
2d ago
+134-47

Description

Release-engineering fixes found while releasing v1.9.2 and v1.10.0-alpha.1, in four commits:

  1. Release charts are packaged as 0.1.0. go-release.yml set the chart versions in the env job, but each
    job has its own checkout, so the release job packaged the charts as 0.1.0, and their default image (the
    templates use v<chart version>) was oamdev/cluster-gateway:v0.1.0. The step now runs in release, before
    helm package, and fails if a version wasn't set.
  2. 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 are ubuntu-24.04. One behaviour change to note:
    skip-duplicate-actions v5 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_skipping takes 'never' instead of false.
  3. 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).
  4. setup-envtest pinned to the branch's controller-runtime release. setup-go v6+ runs with
    GOTOOLCHAIN=local, so go install …/setup-envtest@latest fails when latest needs a newer Go than the branch
    (today on release-1.9: v0.25.3 requires Go 1.26). master uses @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:

CheckResult
CI on a push to each branchgreen: 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.1BuildImage and GoRelease green; latest moved for v1.9.2 only; addon-manager for amd64 + arm64
Release chartscluster-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
Dependabotconfig 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) and release-1.9 (its own Go and kind versions;
    setup-envtest@release-0.19). Dependabot's config only needs to be on master.
  • 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-helm to v5.1.0 and login-action to 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 release job rewrites each chart's version to the trimmed tag (e.g. 1.9.2) before helm 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-envtest is installed from the controller-runtime release in go.mod instead of @latest, since setup-go runs with GOTOOLCHAIN=local and @latest may require a newer Go.
  • skip-duplicate-actions v5 fails instead of reporting "don't skip" when the GitHub API errors, so that step now has continue-on-error: true.