From 6fb8a69e5b35dedfee9a69259cfcf62d815925ed Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Fri, 30 Oct 2026 13:54:29 -0800 Subject: [PATCH] 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 --- .forgejo/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 7f904c59..ed67642a 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -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