fix(08-fix): WR-03 fail closed on empty GITHUB_SHA when computing image tags
This commit is contained in:
@@ -41,6 +41,12 @@ jobs:
|
|||||||
- name: Compute image tags
|
- name: Compute image tags
|
||||||
id: tags
|
id: tags
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
# Fail closed if GITHUB_SHA is empty/unset (Gitea runner env parity is not
|
||||||
|
# guaranteed across versions). Without this guard SHORT_SHA degrades to ""
|
||||||
|
# and the immutable tag silently becomes :v1.1- — a valid-but-wrong tag that
|
||||||
|
# overwrites the milestone pointer and destroys rollback traceability (WR-03).
|
||||||
|
: "${GITHUB_SHA:?GITHUB_SHA is empty — refusing to build a malformed image tag}"
|
||||||
SHORT_SHA=${GITHUB_SHA:0:7}
|
SHORT_SHA=${GITHUB_SHA:0:7}
|
||||||
MILESTONE="${{ env.MILESTONE }}"
|
MILESTONE="${{ env.MILESTONE }}"
|
||||||
echo "latest=git.bergerhouse.net/luckberg/familysync-api:latest" >> $GITHUB_OUTPUT
|
echo "latest=git.bergerhouse.net/luckberg/familysync-api:latest" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user