Since upgrading from setup-go@v3 to setup-go@v5, our matrix strategy workflows are failing due to a go version mismatch. Versions of the tests that are attempting to use previous versions of go are running with later-version libraries, causing failures.
Logs indicate that after setup-go installs the requested version of go, it then installs 1.23.3. This causes tests to run against golang.org/toolchain@v0.0.1-go1.23.3.linux-amd64, which is incompatible with requested golang versions 1.21 and 1.22.
Should install the requested golang version, and only that version.
Actual behavior:
Installs the requested golang version and then a newer golang version.
Run actions/setup-go@v5
Setup go version spec 1.22
Found in cache @ /opt/hostedtoolcache/go/1.22.9/x64
Added go to the path
Successfully set up Go version 1.22
go: downloading go1.23.3 (linux/amd64)
go version go1.23.3 linux/amd64
Description:
Since upgrading from setup-go@v3 to setup-go@v5, our matrix strategy workflows are failing due to a go version mismatch. Versions of the tests that are attempting to use previous versions of go are running with later-version libraries, causing failures.
Example: https://github.com/warewulf/warewulf/actions/runs/12079627670/job/33685781604?pr=1556
Logs indicate that after setup-go installs the requested version of go, it then installs 1.23.3. This causes tests to run against
golang.org/toolchain@v0.0.1-go1.23.3.linux-amd64
, which is incompatible with requested golang versions 1.21 and 1.22.Action version: v5
Platform:
Runner type:
Tools version:
1.21 and 1.22 (erroneously installs 1.23).
Repro steps:
See also: https://github.com/warewulf/warewulf/blob/main/.github/actions/prepare/action.yml
Expected behavior:
Should install the requested golang version, and only that version.
Actual behavior:
Installs the requested golang version and then a newer golang version.