fix(ci): POSIX-safe SHORT_SHA in build.yml #42
Reference in New Issue
Block a user
Delete Branch "dev"
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?
Summary
Fix the regression from PR #40 —
${GITHUB_SHA:0:7}substring expansion is bash-only; the runner executesrun:steps via dash/BusyBox sh and errored withBad substitutionon the65386f0main-push build (bothbuild-webandbuild-mlfailed at "Determine tag" before login/push fired).Switched to
SHORT_SHA=$(printf '%s' "$GITHUB_SHA" | cut -c1-7)which works in both shells. Both build-web and build-ml tag-determination steps updated.Test plan
:main,:latest,:c-<short_sha>without errors.docker pull git.fabledsword.com/bvandeusen/fabledcurator:c-<short_sha>resolves the new per-commit tag.`${GITHUB_SHA:0:7}` substring expansion is bash-only; the runner executes the step via dash/BusyBox sh and errored with `Bad substitution` (act_runner workflow shell, observed on the65386f0main-push run). Switched to `SHORT_SHA=$(printf '%s' "$GITHUB_SHA" | cut -c1-7)` which works in both shells. Both build-web and build-ml tag-determination steps updated.