Repository navigation
fix(ci): read Go version from go.mod instead of hardcoded matrix - #252
Merged
marcusburghardt merged 1 commit intoSep 9, 2026
Merged
marcusburghardt merged 1 commit into
marcusburghardt merged 1 commit into
Conversation
Replace the hardcoded go-version matrix ('1.26') with
go-version-file: 'go.mod' so setup-go installs the exact patch
version declared in the module directive. This prevents CI failures
when Renovate bumps the Go patch version before the GitHub Actions
runner toolcache includes that release.
Changes:
- Remove single-entry strategy matrix (go-version: ['1.26'])
- Switch setup-go input from go-version to go-version-file: 'go.mod'
- Remove matrix-conditional if on the Coverage step
Resolves the Test (1.26) CI failure on PR complytime#239 where go.mod requires
go >= 1.26.8 but the runner only had 1.26.7 with GOTOOLCHAIN=local.
Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
marcusburghardt
enabled auto-merge
September 9, 2026 08:00
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
Replace the hardcoded
go-versionmatrix ('1.26') inci_local.ymlwithgo-version-file: 'go.mod'so thatsetup-goinstalls the exact patch version declared in the module directive, downloading it fromgo.devif it is not yet in the runner toolcache.Problem
Renovate PR #239 bumps the
godirective ingo.modfrom1.26.5to1.26.8. The CI workflow usesgo-version: '1.26', which resolves to whatever patch is cached on the GitHub Actions runner (currently 1.26.7). Becausesetup-gov7 setsGOTOOLCHAIN=local, Go refuses to build when the running version (1.26.7) is older than whatgo.modrequires (1.26.8):This will recur on every Renovate Go patch bump where the runner toolcache lags behind
go.devreleases.Changes
go-version: ['1.26']) — it served only to parameterize the Go version and had a single entry.setup-goinput fromgo-version: ${{ matrix.go-version }}togo-version-file: 'go.mod'—setup-gov7 reads thegodirective and downloads the exact patch version if needed.if: matrix.go-version == '1.26'on the Coverage step — with no matrix, coverage runs unconditionally (same behavior as before since the matrix had only one entry).Notes
Test (1.26)toTest(no matrix suffix). No branch protection rules reference the old name.module-syncjob is unchanged.Assisted-by: OpenCode (claude-opus-4-6)