fix(ci): POSIX shell in deb/rpm Version step (dash "Bad substitution")
ci / docs-site (push) Failing after 43s
ci / rust (push) Failing after 2m13s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 6s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
ci / web (push) Failing after 47s
apple / swift (push) Successful in 1m17s
deb / build-publish (push) Successful in 2m48s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m10s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
rpm / build-publish (push) Failing after 30s
docker / deploy-docs (push) Successful in 17s

deb.yml runs in the Ubuntu rust-ci image whose /bin/sh is dash, where the bash
substring `${GITHUB_SHA::8}` is a "Bad substitution" — the deb build failed at the
Version step every run. Compute the short SHA with `cut` instead. (rpm.yml ran fine
because the Fedora image's /bin/sh is bash, but fix it the same way for robustness.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-12 22:48:12 +00:00
parent 0b1322d1c6
commit 71d6b64f81
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -60,9 +60,10 @@ jobs:
# BEFORE 0.0.1 (the '~') yet monotonically increases by run number, so `apt upgrade` # BEFORE 0.0.1 (the '~') yet monotonically increases by run number, so `apt upgrade`
# always moves the boxes to the newest main build. # always moves the boxes to the newest main build.
run: | run: |
SHORT=$(echo "$GITHUB_SHA" | cut -c1-8)
case "$GITHUB_REF" in case "$GITHUB_REF" in
refs/tags/v*) V="${GITHUB_REF_NAME#v}" ;; refs/tags/v*) V="${GITHUB_REF_NAME#v}" ;;
*) V="0.0.1~ci${GITHUB_RUN_NUMBER}.g${GITHUB_SHA::8}" ;; *) V="0.0.1~ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;;
esac esac
echo "VERSION=$V" >> "$GITHUB_ENV" echo "VERSION=$V" >> "$GITHUB_ENV"
echo "package version $V" echo "package version $V"
+2 -1
View File
@@ -46,9 +46,10 @@ jobs:
# sorts BEFORE the eventual "1" yet increases by run number, so `rpm-ostree upgrade` # sorts BEFORE the eventual "1" yet increases by run number, so `rpm-ostree upgrade`
# always moves to the newest main build. # always moves to the newest main build.
run: | run: |
SHORT=$(echo "$GITHUB_SHA" | cut -c1-8)
case "$GITHUB_REF" in case "$GITHUB_REF" in
refs/tags/v*) V="${GITHUB_REF_NAME#v}"; R="1" ;; refs/tags/v*) V="${GITHUB_REF_NAME#v}"; R="1" ;;
*) V="0.0.1"; R="0.ci${GITHUB_RUN_NUMBER}.g${GITHUB_SHA::8}" ;; *) V="0.0.1"; R="0.ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;;
esac esac
echo "PF_VERSION=$V" >> "$GITHUB_ENV" echo "PF_VERSION=$V" >> "$GITHUB_ENV"
echo "PF_RELEASE=$R" >> "$GITHUB_ENV" echo "PF_RELEASE=$R" >> "$GITHUB_ENV"