File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,24 @@ jobs:
100100 INSPECT="docker manifest inspect ghcr.io/${{ inputs.organization }}/${{ inputs.repository }}/${{ matrix.package }}"
101101 SOURCE=$(${INSPECT}:${{ inputs.tag_promote }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
102102 TARGET=$(${INSPECT}:${{ inputs.target }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
103+ if [ "${SOURCE}" != "${TARGET}" ]; then
104+ echo "ERROR: Tagging failed!"
105+ echo "RETRY=true" >> $GITHUB_ENV
106+ fi
107+
108+ - uses : shrink/actions-docker-registry-tag@v4
109+ if : env.RETRY == 'true'
110+ with :
111+ registry : ghcr.io
112+ repository : ${{ inputs.organization }}/${{ inputs.repository }}/${{ matrix.package }}
113+ target : ${{ inputs.target }}
114+ tags : ${{ inputs.tag_promote }}
115+
116+ - run : |
117+ # Verify tagging after retry
118+ INSPECT="docker manifest inspect ghcr.io/${{ inputs.organization }}/${{ inputs.repository }}/${{ matrix.package }}"
119+ SOURCE=$(${INSPECT}:${{ inputs.tag_promote }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
120+ TARGET=$(${INSPECT}:${{ inputs.target }} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
103121 if [ "${SOURCE}" != "${TARGET}" ]; then
104122 echo "ERROR: Tagging failed!"
105123 exit 1
You can’t perform that action at this time.
0 commit comments