Skip to content

Commit 17d3038

Browse files
authored
chore: compare before and after tags, fail as necessary (#54)
1 parent 0508458 commit 17d3038

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/.pr-close.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ jobs:
9595
target: ${{ inputs.target }}
9696
tags: ${{ inputs.tag_promote }}
9797

98+
- run: |
99+
# Verify tagging
100+
INSPECT="docker manifest inspect ghcr.io/${{ inputs.organization }}/${{ inputs.repository }}/${{ matrix.package }}"
101+
SOURCE=$(${INSPECT}:${{ inputs.tag_promote }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
102+
TARGET=$(${INSPECT}:${{ inputs.target }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
103+
if [ "${SOURCE}" != "${TARGET}" ]; then
104+
echo "ERROR: Tagging failed!"
105+
exit 1
106+
fi
107+
98108
# Clean up OpenShift when PR closed, no conditions
99109
cleanup:
100110
name: OpenShift

0 commit comments

Comments
 (0)