From 801ba265fee92ce2d65db50eaa48a6260cbd444d Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 21 Nov 2026 00:03:55 +1100 Subject: [PATCH] Let ko install pick its Go toolchain (#185) setup-go exports GOTOOLCHAIN=local, pinning the Go version from go.mod (1.25.9). ko v0.19.1 requires go >= 1.26.3, so `go install` of ko fails in the GitHub Actions build and release jobs. - Set GOTOOLCHAIN=auto on the ko install step in ci.yml so Go fetches the toolchain ko needs - Set GOTOOLCHAIN=auto on the ko/crane install step in release.yml Reviewed-on: https://git.unkin.net/unkin/artifactapi/pulls/185 Co-authored-by: unkin-agent Co-committed-by: unkin-agent --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3eee8c..b02affb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,8 @@ jobs: go-version-file: go.mod - run: go build ./... - run: go install github.com/google/ko@v0.19.1 + env: + GOTOOLCHAIN: auto - run: ko build --push=false --bare --platform linux/amd64 ./cmd/artifactapi env: KO_DOCKER_REPO: ghcr.io/iuclabs/artifactapi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf6985d..9d182f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,8 @@ jobs: - run: | go install github.com/google/ko@v0.19.1 go install github.com/google/go-containerregistry/cmd/crane@v0.22.1 + env: + GOTOOLCHAIN: auto - run: echo "${GITHUB_TOKEN}" | crane auth login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}