Skip to content

Commit e92fedb

Browse files
committed
retry image tagging for 300 seconds
1 parent 1571929 commit e92fedb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,12 @@ runs:
195195
done
196196
197197
echo "Retagging image with release version and :latest tags for ${{ inputs.docker-image }} 🏷"
198-
curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.tag }}"
199-
curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.latest }}"
200-
198+
end=$((SECONDS+300))
199+
while [ $SECONDS -lt $end ]; do
200+
curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.tag }}" &&
201+
curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.latest }}" && break
202+
sleep 10
203+
done
201204
- name: Checkout GitOps Repository
202205
if: inputs.gitops-token != ''
203206
uses: actions/checkout@v4

0 commit comments

Comments
 (0)