Skip to content

Commit 7000396

Browse files
aledbfclaude
andcommitted
build(tasks): take the common tasks from go-tools
versions, bump, release, lint:workflows and consumers now come from go-tools' release, through one include, with the names and arguments they have in every spin-stack repository. go-tools moves to v0.20261122.5, the first module whose `go tool task` names that file and whose versions gate counts what its tasks read. The task that runs GoReleaser was named release, a name the include defines, and Task refuses a Taskfile that has both. It is release:artifacts now, after what it does. No workflow called it: release.yml runs GoReleaser through its action. The common release is taken without a gate, so it refuses. A release here is still release.yml's, dispatched: it runs e2e, the whole runtime matrix and publish parity on the commit before tagging it, and GoReleaser fills a draft a person publishes. Moving that onto the common task changes how the tool is released and is not done here. lint runs lint:workflows, so actionlint is pinned (v1.7.12, spin's) and .github/actionlint.yaml names the docker8 fleet's runner label, which actionlint otherwise reports as unknown. Part of spin-stack/go-tools#135 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1 parent df5192b commit 7000396

5 files changed

Lines changed: 36 additions & 10 deletions

File tree

‎.github/actionlint.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
# spin-stack/ci's docker8 fleet, where the jobs that build and run containers land (go-cli.yml
4+
# says why): an 8-vCPU EC2 instance per job.
5+
- runs-on/fleet=docker8/env=production

‎Taskfile.yml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ vars:
2727
# What a release archive and the image carry beside the binary (.goreleaser.yml, Dockerfile).
2828
NOTICES: LICENSE.txt NOTICE THIRD_PARTY_NOTICES
2929

30+
includes:
31+
# versions, bump, release, lint:workflows and consumers, as every spin-stack repository has them
32+
# (go-tools' internal/tasks/tasks.yml). No GATE_WORKFLOW and GATE_JOBS, so release refuses: a
33+
# release here is release.yml's, dispatched. It runs e2e, the whole runtime matrix and publish
34+
# parity on the commit before it tags it, which no run of go-cli.yml on a push does, and
35+
# GoReleaser then fills a draft that a person publishes once it has its archives.
36+
common:
37+
taskfile: "{{.GO_TOOLS_TASKS}}"
38+
flatten: true
39+
3040
tasks:
3141
default:
3242
desc: Build and test the Go CLI
@@ -200,10 +210,11 @@ tasks:
200210
- go test ./internal/cli -run TestE2E -count=1 -timeout 5m -v {{.CLI_ARGS}}
201211

202212
lint:
203-
desc: Run Go static checks and go-tools' gates - golangci-lint, goroutine lifetimes, tests that cannot fail, AGENTS.md's references, unreachable code, one task per workflow step, pnpm through Socket Firewall
213+
desc: Run Go static checks and go-tools' gates - golangci-lint, the workflows (actionlint, actions pinned by commit), goroutine lifetimes, tests that cannot fail, AGENTS.md's references, unreachable code, one task per workflow step, pnpm through Socket Firewall
204214
cmds:
205215
- go vet ./cmd/... ./internal/...
206216
- task: lint:go
217+
- task: lint:workflows
207218
- ctxlife
208219
- testquality -allow .github/testquality-allow.txt ./...
209220
- refs
@@ -413,8 +424,8 @@ tasks:
413424
- rm -f {{.BINARY}} coverage.out coverage.html
414425
- rm -rf artifacts dist src/test/tmp
415426

416-
release:
417-
desc: Run GoReleaser; pass --snapshot for a local release
427+
release:artifacts:
428+
desc: Build the release's archives, SBOMs and image with GoReleaser (-- --snapshot for a local build that publishes nothing)
418429
preconditions:
419430
- sh: command -v goreleaser >/dev/null
420431
msg: goreleaser is required

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/opencontainers/image-spec v1.1.1
1616
github.com/spf13/cobra v1.10.2
1717
github.com/spf13/pflag v1.1.0
18-
github.com/spin-stack/go-tools v0.20261118.9
18+
github.com/spin-stack/go-tools v0.20261122.5
1919
github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f
2020
github.com/testcontainers/testcontainers-go v0.45.0
2121
go.uber.org/mock v0.6.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiT
112112
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
113113
github.com/spf13/pflag v1.1.0 h1:6W6MbVUrnMb8PEhjkqwsVLY7ryuzRfFHF4mQd7L94ag=
114114
github.com/spf13/pflag v1.1.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
115-
github.com/spin-stack/go-tools v0.20261118.9 h1:D8fNq3qR/m8E/Koy3K+vRlug6z3uW0yYhwf74AMkyYU=
116-
github.com/spin-stack/go-tools v0.20261118.9/go.mod h1:Dz0i5ToXAyvGuFxMiSKu5pnH/gcA/k1WOX0FNmAt+GM=
115+
github.com/spin-stack/go-tools v0.20261122.5 h1:KsHTqIpBGuCc2kyB+0xn6oU+QiiSerC3fuWRJ1KoesA=
116+
github.com/spin-stack/go-tools v0.20261122.5/go.mod h1:E+Fw4T6GukPSmPlRNFT3OymrKnHzTGX1efcz1+l812c=
117117
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
118118
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
119119
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=

‎versions.yaml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Every input this repository pins, written once: `versions check` says what is behind,
2-
# `versions bump <name>` moves one (go-tools' commands, on the PATH of `go tool task`), and internal/devtools/versions_gate_test.go fails on a
1+
# Every input this repository pins, written once: `go tool task versions` says what is behind,
2+
# `go tool task bump NAME=<name>` moves one, and internal/devtools/versions_gate_test.go fails on a
33
# pin written anywhere else. GitHub Actions are pinned by commit in the workflows; Dependabot
44
# moves those, as go.sum is Go's.
55

@@ -33,7 +33,7 @@
3333
track: digest
3434
note: >-
3535
The released image's base (Dockerfile's DISTROLESS_IMAGE, handed to GoReleaser by task
36-
release:env). A bump is checked by task release --snapshot and task release:smoke.
36+
release:env). A bump is checked by task release:artifacts -- --snapshot and task release:smoke.
3737
3838
- name: task
3939
kind: download
@@ -56,4 +56,14 @@
5656
track: github-release https://github.com/google/go-licenses
5757
note: >-
5858
task release:notices, which writes THIRD_PARTY_NOTICES for the release archives and image.
59-
A bump is checked by task release:notices and the archive listing of task release --snapshot.
59+
A bump is checked by task release:notices and by the archives task release:artifacts --
60+
--snapshot lists.
61+
62+
- name: actionlint
63+
kind: module
64+
source: github.com/rhysd/actionlint/cmd/actionlint
65+
version: v1.7.12
66+
track: github-release https://github.com/rhysd/actionlint
67+
note: >-
68+
task lint:workflows, which task lint runs. spin's version, so the spin-stack repositories'
69+
workflows are read by the same linter.

0 commit comments

Comments
 (0)