From c1f92514b9e1a3d00b2eb9d47fdbb141336af538 Mon Sep 17 00:00:00 2001 From: Aitor Perez Cedres Date: Thu, 14 Dec 2023 14:20:36 +0000 Subject: [PATCH] Pin Go version to 1.20 minor in CI 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 --- .github/workflows/build-test-publish.yml | 2 +- .github/workflows/pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 7cb51381..61d806e6 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -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: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf9052ba..9d15dc03 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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: