Tag the image with the commit built, not the one the run started on [skip ci]

After Merge upstream, $GITHUB_SHA is still the pre-merge commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Philip Peterson 2026-10-30 13:54:29 -08:00
parent 085b5d2e65
commit 6fb8a69e5b

View file

@ -76,7 +76,10 @@ jobs:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
printf %s "$REGISTRY_TOKEN" | podman login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
for t in "$TAG" "$TAG-$(date -u +%Y%m%d)" "${GITHUB_SHA::12}"; do
# The commit built, not $GITHUB_SHA: after "Merge upstream" that's
# the merge, not the commit the run started from.
built=$(git rev-parse HEAD)
for t in "$TAG" "$TAG-$(date -u +%Y%m%d)" "${built::12}"; do
podman tag "localhost/aurora:$TAG" "$IMAGE:$t"
podman push --retry 5 "$IMAGE:$t"
done