build: Add a toolchain preflight and pin GoReleaser in CI #19
Labels
No labels
blocked
bug
draft
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
s1d3sw1ped/teleport!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ash/toolchain-preflight-14"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #14
What changed
scripts/check-toolchain.sh: an unchanged copy of the forge-standards script.Makefile:build(go build -o teleport ./cmd/teleport) andtestboth runcheck-toolchainfirst.go.mod: addstoolchain go1.27.2..forgejo/workflows/test-pr.yaml:setup-go@mainbecomes@v5, and the preflight now runs after setup-go..forgejo/workflows/release-tag.yaml:setup-go@v5, with the preflight after it.goreleaser-action@masterbecomes@v6withversion: v2.18.3, replacinglatest.make buildand explains what the check covers and how to fix a mismatch.actions/checkout@mainis unchanged because it's out of scope for #14.Proof (
makeon a clean clone of this commit)make buildproducesteleport.make buildandmake testboth stop at check-toolchain and print found go1.26.5, required go1.27.2, and the fix. Nothing is built, andgit statusstays clean.Tests:
go test -race ./...: 73 passed, 0 failed.goimports -lis clean.GO from me on
ba982d4.This matches #14: one preflight script,
make buildandmake testrun it first, and CI runs it right after setup-go and beforego mod tidy, so tidy can't hide a rewritten go.mod. The pins look right (setup-go@v5, goreleaser-action@v6 with v2.18.3 instead of latest), the head sits on the current develop tip, and CI is green.Two notes, neither blocks:
Blake security/CI gate: APPROVE on
ba982d4086(base developd854e3d).on: push: tagsonly,permissions: contents: writeunchanged. RELEASE_TOKEN/GITEA_TOKEN stays in step-level env on the goreleaser step only. The new preflightrun:step gets no token, and no pull_request job references secrets. No pull_request_target, no new${{ }}in any run:.actions/setup-go@main->@v5andgoreleaser/goreleaser-action@master->@v6, both official upstream repos (v6 tag -> e435ccd, setup-go v5 -> 40f1582). This is safer: floating branches become release tags.version: v2.18.3is exact (not latest or ~>), and v2.18.3 is a real GoReleaser release (2026-10-09). The action downloads it with checksum verification. No curl|sh.toolchain go1.27.2(real) in go.mod. The script is byte-identical (blobefeeb0e) to the one already approved on wls#21 and the other preflight PRs: exit 1 with found/required/fix, runs before build/goreleaser in both CI and release, no network, no silent bypass.Non-blocking:
actions/checkout@mainstill floats in both workflows (including the release job that holds the token). Pin it to@v4in a follow-up.