Skip to content

feat(image): expose default go on PATH (parity with ubuntu-latest)#24

Open
ozeranskii wants to merge 1 commit into
mainfrom
feat/go-on-default-path
Open

feat(image): expose default go on PATH (parity with ubuntu-latest)#24
ozeranskii wants to merge 1 commit into
mainfrom
feat/go-on-default-path

Conversation

@ozeranskii

Copy link
Copy Markdown
Contributor

Go was baked into the toolcache (for setup-go offline cache hits) but never put on the default PATH — unlike ubuntu-latest, which exposes its newest cached Go as the system go. Tools that assume a system go (e.g. pre-commit golang hooks such as gitleaks and actionlint) therefore tried to download a toolchain from go.dev and failed on restricted egress.

  • Symlink the newest baked version to /usr/local/go and add /usr/local/go/bin + the GOPATH bin (/home/runner/go/bin) to PATH.
  • GOROOT resolves into the toolcache, matching ubuntu-latest — no extra download, no extra version pin (follows the existing GO_126 bump).
  • Smoke assertion: go is on PATH at the expected version.

Verified: which go/usr/local/go/bin/go, go version → go1.26.4, GOROOT → toolcache, and shutil.which('go') (what pre-commit checks) resolves — so it uses the system Go instead of downloading one.

Go was baked into the toolcache (for setup-go offline cache hits) but never
put on the default PATH, unlike ubuntu-latest which exposes its newest cached
Go as the system go. Tools that assume a system go — e.g. pre-commit golang
hooks (gitleaks, actionlint) — therefore tried to download a toolchain from
go.dev and failed on restricted egress.

Symlink the newest baked version to /usr/local/go and add /usr/local/go/bin
and the GOPATH bin (/home/runner/go/bin) to PATH. GOROOT resolves into the
toolcache, matching ubuntu-latest; no extra download or version pin. A smoke
assertion guards that go is on PATH at the expected version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant