1
0
mirror of https://github.com/distribution/distribution synced 2024-12-25 15:05:51 +01:00

ci: fix GHA CI build matrix

It would appear that requesting Go 1.21 in the build matrix has no
effect whatsoever on what go toolchain is actually used to build the
project.

Specifying 1.22.0 in the go.mod go directive forces the 1.22 toolchain
to be used for building Go source files, ignoring whatever Go version we
set in the GHA CI matrix.

Luckily we can enforce the right setting by setting GOTOOLCHAIN=local
which forces Go to use the locally available toolchain instead of
downloading the one requested by go.mod.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2024-08-15 09:53:39 +01:00
parent d0eebf3af4
commit 997c29dbda
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

@ -22,6 +22,12 @@ permissions:
jobs:
test:
env:
# Setting GOTOOLCHAIN to local tells go
# to to use the bundled Go version rather
# than fetching the tolchain according to
# toolchain directive found in go.mod.
GOTOOLCHAIN: local
runs-on: ubuntu-latest
strategy:
fail-fast: false

2
go.mod

@ -1,6 +1,6 @@
module github.com/distribution/distribution/v3
go 1.22.0
go 1.21.0
require (
cloud.google.com/go/storage v1.30.1