diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index f14afd6a58..ab9283fa02 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -311,7 +311,6 @@ jobs: runs-on: ubuntu-latest if: ${{ !cancelled() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} needs: [merge] - continue-on-error: true strategy: fail-fast: false matrix: @@ -403,5 +402,16 @@ jobs: [ -z "$TAG" ] && continue DEST="${DOCKERHUB_IMAGE}:${TAG}" echo " -> ${DEST}" - docker buildx imagetools create -t "${DEST}" "${SOURCE}" + for ATTEMPT in 1 2 3; do + if docker buildx imagetools create -t "${DEST}" "${SOURCE}" && \ + docker buildx imagetools inspect "${DEST}"; then + break + fi + if [ "${ATTEMPT}" = "3" ]; then + echo "Failed to copy ${DEST} after ${ATTEMPT} attempts" + exit 1 + fi + echo "Copy attempt ${ATTEMPT} for ${DEST} failed, retrying in 15s..." + sleep 15 + done done <<< "${{ steps.tags.outputs.tags }}"