ci: make Setup Go Workspace idempotent on ci-single runner

The publish-eks-ami matrix fans out four legs on the single persistent
ci-single runner, all reusing one workspace root. go work init is
create-only and checkout never scrubs the root go.work, so legs after the
first fail with 'go.work already exists'. Remove any stale go.work before
init so each leg re-inits cleanly.
This commit is contained in:
joshsiv-mulga
2026-07-14 15:35:55 +10:00
parent 744cb1929d
commit b147e2b869
+7 -1
View File
@@ -105,7 +105,13 @@ jobs:
cache: false
- name: Setup Go Workspace
run: go work init ./spinifex ./viperblock ./predastore
# Idempotent: the ci-single runner reuses one workspace across matrix
# legs and runs, and checkout never scrubs the root go.work. Remove any
# stale file so each leg re-inits cleanly instead of failing on
# "go.work already exists".
run: |
rm -f go.work go.work.sum
go work init ./spinifex ./viperblock ./predastore
- name: Install build + upload tooling
run: |