actions / setup-go

Set up your GitHub Actions workflow with a specific version of Go
MIT License
1.41k stars 531 forks source link

go 1.22.0-rc.1 is not found #452

Closed ncw closed 10 months ago

ncw commented 10 months ago

Description:

Go 1.22rc1 was released on 19th December 2023.

I wanted to pull this in to my build using the tag 1.22.0-rc.1 but it is not found.

Action version:

v5

Platform:

Runner type:

Repro steps:

      - name: Install Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.22.0-rc.1'
          check-latest: true

Expected behavior:

go1.22rc1 is installed

Actual behavior:

I see this in the actions logs

linux   Install Go  2024-01-13T17:18:21.5776523Z Setup go version spec go: 1.22.0-rc.1
linux   Install Go  2024-01-13T17:18:21.5780767Z Attempting to resolve the latest version from the manifest...
linux   Install Go  2024-01-13T17:18:21.8584780Z matching go: 1.22.0-rc.1...
linux   Install Go  2024-01-13T17:18:21.8712092Z Failed to resolve version go: 1.22.0-rc.1 from manifest
linux   Install Go  2024-01-13T17:18:21.8728960Z Attempting to download go: 1.22.0-rc.1...
linux   Install Go  2024-01-13T17:18:22.0954532Z matching go: 1.22.0-rc.1...
linux   Install Go  2024-01-13T17:18:22.1039051Z Not found in manifest.  Falling back to download directly from Go
linux   Install Go  2024-01-13T17:18:24.4146200Z ##[error]Unable to find Go version 'go: 1.22.0-rc.1' for platform linux and architecture x64.

From: https://github.com/rclone/rclone/actions/runs/7513822463/job/20455990580

darthShadow commented 10 months ago

The go: prefix in the version string (https://github.com/rclone/rclone/blob/58d1fd69963cca7c3dd6f97133751ba0ae570646/.github/workflows/build.yml#L35) is causing the mismatch so 1.22.0-rc.1 rather than go: 1.22.0-rc.1.

ncw commented 10 months ago

Thanks @darthShadow - can't believe I messed this up again! Sorry for the noise :-(