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:
parent
085b5d2e65
commit
6fb8a69e5b
1 changed files with 4 additions and 1 deletions
|
|
@ -76,7 +76,10 @@ jobs:
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
printf %s "$REGISTRY_TOKEN" | podman login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
|
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 tag "localhost/aurora:$TAG" "$IMAGE:$t"
|
||||||
podman push --retry 5 "$IMAGE:$t"
|
podman push --retry 5 "$IMAGE:$t"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue