Skip to content

[codex] Sync Docker Go version with go.mod#80

Merged
simonwhitaker merged 2 commits into
mainfrom
simonwhitaker/go-toolchain
Apr 6, 2026
Merged

[codex] Sync Docker Go version with go.mod#80
simonwhitaker merged 2 commits into
mainfrom
simonwhitaker/go-toolchain

Conversation

@simonwhitaker
Copy link
Copy Markdown
Owner

This change fixes a dependency-update failure mode where runny update-deps can raise the Go version in go.mod but leave the Docker build pinned to an older golang:<version>-alpine image, causing docker build to fail before the binary is built. The root cause is that the supported Go version was effectively defined in two places, with go.mod moving automatically during dependency updates and Dockerfile remaining a separate manual edit.

The fix adds tools/sync-go-version.sh to derive the Docker builder image from the go directive in go.mod, wires that script into runny update-deps, and adds an explicit --check guard so both Docker CI and the release Docker workflow fail fast if the files drift out of sync. I validated the change by running ./tools/sync-go-version.sh --check, simulating a mismatched Docker base image to confirm the guard fails with a targeted error, and running docker build -t gibo:test . successfully.

@simonwhitaker simonwhitaker marked this pull request as ready for review April 6, 2026 08:41
@simonwhitaker simonwhitaker merged commit 99e07e5 into main Apr 6, 2026
2 checks passed
@simonwhitaker simonwhitaker deleted the simonwhitaker/go-toolchain branch April 6, 2026 08:42
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