ci: pin Go-build step to bash (Gitea runner defaults run steps to sh)
The out-of-VM Go build step used `set -euo pipefail`, but the self-hosted
Gitea/act runner runs `run:` steps under sh (dash), which rejects
`-o pipefail` ("Illegal option"). Add `shell: bash` to the step. Keeping
`set -e` is load-bearing: without it a failed go build/test in the first
subshell group is masked by the trailing `file` command's success, letting
a broken binary reach the Packer build.
This commit is contained in:
@@ -204,6 +204,11 @@ jobs:
|
|||||||
# Reproducible: pinned Go (1.26.4) + go.sum-pinned deps + -trimpath/no buildid.
|
# Reproducible: pinned Go (1.26.4) + go.sum-pinned deps + -trimpath/no buildid.
|
||||||
# fleet-enrol fetches go-tpm from the proxy (pinned by go.sum); hostapi is
|
# fleet-enrol fetches go-tpm from the proxy (pinned by go.sum); hostapi is
|
||||||
# stdlib-only (GOPROXY=off).
|
# stdlib-only (GOPROXY=off).
|
||||||
|
# shell: bash is explicit — the Gitea/act runner defaults run steps to sh
|
||||||
|
# (dash), where `set -o pipefail` is an illegal option. `set -e` is
|
||||||
|
# load-bearing: without it a failed go build/test in the first ( … ) group
|
||||||
|
# is masked by the trailing `file` success and a broken binary reaches Packer.
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
( cd files/enrol \
|
( cd files/enrol \
|
||||||
|
|||||||
Reference in New Issue
Block a user