Skip to content

Commit

Permalink
Pin Go version to 1.20 minor in CI
Browse files Browse the repository at this point in the history
GO 1.21 creates a non-backwards compatible change in the Go mod file. It
adds a 'toolchain' directive that it's not compatible with <1.21
versions. As a consequence, if a go-1.21 binary modifies the Go mod e.g.
via go mod download, the resulting Go mod won't be compatible with
earlier Go version i.e. 1.20.

The above breaks our CI, because our Go mod gets modified, and the Go
version in the Dockerfile is pinned to 1.20.

Signed-off-by: Aitor Perez Cedres <[email protected]>
  • Loading branch information
Zerpet committed Dec 14, 2023
1 parent 24dfc44 commit c1f9251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
tags: [ "v*" ]

env:
GO_VERSION: ~1.20 # Require Go 1.20 and above, but lower than Go 2.0.0
GO_VERSION: '1.20.x' # Require Go 1.20 minor

jobs:
unit_integration_tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ main ]

env:
GO_VERSION: '^1.20' # Require Go 1.20 and above, but lower than Go 2.0.0
GO_VERSION: '1.20.x' # Require Go 1.20.x

jobs:

Expand Down

0 comments on commit c1f9251

Please sign in to comment.