Description:
When running setup-go, we usually do the following:
jobs:
foo:
runs-on:
- bar
steps:
- name: "Checkout Actions"
uses: actions/checkout@v5
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false
....
Expected behavior:
The latest go1.23 version to be downloaded and the job is done.
However, setup-go@v5's implementation will not respect this and tries to install the version specified from the toolchain directive in go.mod, if the checked out repository contains a go.mod file, which seems unintended.
For reference, I tried using v6 and got the expected behavior.
Are you willing to submit a PR?
Sorry, I'm quite busy at work!