Skip to content

chore: let Renovate track Go minor version in setup-go workflows - #5981

Merged
mstoykov merged 2 commits into
masterfrom
renovate-track-setup-go-version
Jun 8, 2026
Merged

chore: let Renovate track Go minor version in setup-go workflows#5981
mstoykov merged 2 commits into
masterfrom
renovate-track-setup-go-version

Conversation

@mstoykov

Copy link
Copy Markdown
Contributor

Summary

Adds a Renovate customManager so the Go version pinned in our GitHub Actions workflows gets bumped automatically when a new Go minor release ships, instead of needing manual PRs.

The regex matches two forms used across the workflows:

  • Plain: go-version: 1.26.x
  • Matrix: go-version: [1.26.x]

Only the major.minor portion is replaced — the .x suffix stays, so workflows still pick up the latest patch automatically.

Files covered

  • lint.yml, tc39.yml, wpt.yml, xk6.yml
  • test.yml, test-browser.yml (both [1.25.x] and [1.26.x] matrix entries)

Intentionally excluded

  • browser_e2e.yml — uses 1.x (floating major, doesn't need bumping)
  • build.yml — Go version comes from a workflow input, not a literal

Notes

  • The two [1.25.x] matrix entries in test.yml / test-browser.yml look like deliberate N-1 lagging. With this manager, Renovate will propose bumping them too — if we want them pegged behind, a follow-up packageRule with matchFileNames + allowedVersions can constrain them.
  • Renovate needs a GitHub token at runtime to resolve github-releases lookups (already the case in CI).

Test plan

  • renovate-config-validator passes on the new config
  • Regex matches exactly the 8 expected lines (verified via grep)
  • Local renovate --dry-run=lookup extracts depName: golang/go for each matched file; with one file temporarily downgraded to 1.20.x, Renovate flags it as a separate update candidate from the others on 1.26.x
  • After merge: confirm Renovate opens the expected PR(s) on the next scheduled run

Add a customManager that watches `go-version: 1.X.x` (and the bracketed
matrix form `[1.X.x]`) in `.github/workflows/*.yml` and bumps the
major.minor portion whenever a new Go minor release ships. The `.x`
suffix is preserved so workflows keep tracking the latest patch.

Covers: lint, tc39, wpt, xk6, test, test-browser.
Excludes: browser_e2e.yml (floating `1.x`) and build.yml (dynamic input).
@mstoykov
mstoykov requested a review from a team as a code owner May 13, 2026 13:02
@mstoykov
mstoykov requested review from inancgumus and szkiba and removed request for a team May 13, 2026 13:02
szkiba
szkiba previously approved these changes May 13, 2026
@mstoykov
mstoykov temporarily deployed to azure-trusted-signing May 13, 2026 13:08 — with GitHub Actions Inactive
@mstoykov
mstoykov temporarily deployed to azure-trusted-signing May 13, 2026 13:10 — with GitHub Actions Inactive
Comment thread renovate.json Outdated
Co-authored-by: Inanc Gumus <inanc.gumus@grafana.com>
@mstoykov
mstoykov temporarily deployed to azure-trusted-signing May 14, 2026 07:48 — with GitHub Actions Inactive
@mstoykov
mstoykov temporarily deployed to azure-trusted-signing May 14, 2026 07:50 — with GitHub Actions Inactive
@mstoykov
mstoykov requested review from inancgumus and szkiba May 14, 2026 11:33
@mstoykov mstoykov added this to the v2.1.0 milestone May 15, 2026
@mstoykov
mstoykov merged commit 238e30d into master Jun 8, 2026
50 of 51 checks passed
@mstoykov
mstoykov deleted the renovate-track-setup-go-version branch June 8, 2026 15:54
mstoykov added a commit that referenced this pull request Jul 2, 2026
The Go versions used across the CI workflows were hardcoded in each
file. With the Renovate manager added in #5981, the deliberate N-1
matrix entry in test.yml/test-browser.yml looked identical to the
current-version entry, so Renovate tried to bump it to latest (#6085),
collapsing the current + previous coverage into testing one version
twice.

Introduce .github/go-versions.env as the single source of truth for
GO_VERSION_CURRENT and GO_VERSION_PREV, read via a new
.github/actions/go-versions composite action. Non-matrix workflows
(lint, tc39, wpt, xk6) and the lint action resolve the version in a
step; the matrix workflows (test, test-browser) gain a small configure
job that feeds the versions into their matrices.

Both versions are now bumped manually with each Go release, so the
Renovate custom manager for Go is removed.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

3 participants