From 6d8d6b713b49322aa7daa893d4e395f060c614fb Mon Sep 17 00:00:00 2001 From: Alphaeus Mote Date: Wed, 2 Sep 2026 09:33:57 -0400 Subject: [PATCH] ci: align Go toolchain to go.mod (1.25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit go get bumped go.mod to 'go 1.25.0' (modernc requirement), but CI used setup-go 1.24 and the image used golang:1.24 — with GOTOOLCHAIN=local the test step failed ('requires go >= 1.25.0'). Install the exact version from go.mod via go-version-file, bump the builder image to golang:1.25-alpine, and drop the stray GOTOOLCHAIN override in build.ps1. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/release.yml | 4 +++- Dockerfile | 2 +- scripts/build.ps1 | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8d4e369..ad2f363 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -94,7 +94,9 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '1.24' + # Install exactly the version go.mod requires so GOTOOLCHAIN=local has + # a matching toolchain and never needs to download one. + go-version-file: backend/go.mod - name: Setup Node uses: actions/setup-node@v4 diff --git a/Dockerfile b/Dockerfile index 53e48b7..f8eabc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN npm run build # --------------------------------------------------------------------------- # Stage 2: build the Go binary with the UI embedded # --------------------------------------------------------------------------- -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder # Pure-Go SQLite (modernc.org/sqlite) means no C toolchain is needed. RUN apk add --no-cache git diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 1d4c137..a79e7c0 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -114,7 +114,6 @@ if ($BuildWindows) { $GoVersionInfo = Join-Path (Join-Path $env:USERPROFILE "go\bin") "goversioninfo.exe" if (-not (Test-Path $GoVersionInfo)) { Write-Host " Installing goversioninfo..." -ForegroundColor Yellow - $env:GOTOOLCHAIN = "local" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@v1.7.0 } $vp = $Version -split '\.' -- 2.52.0