summaryrefslogtreecommitdiff
path: root/.github/workflows/meshmc-container.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/meshmc-container.yml')
-rw-r--r--.github/workflows/meshmc-container.yml29
1 files changed, 24 insertions, 5 deletions
diff --git a/.github/workflows/meshmc-container.yml b/.github/workflows/meshmc-container.yml
index 03b88fb0e5..4af5956454 100644
--- a/.github/workflows/meshmc-container.yml
+++ b/.github/workflows/meshmc-container.yml
@@ -74,15 +74,34 @@ jobs:
tags: ${{ steps.image-metadata.outputs.tags }}
labels: ${{ steps.image-metadata.outputs.labels }}
- - name: Push image
- id: push-image
+ - name: Login to registry
if: ${{ github.event_name != 'pull_request' }}
- uses: redhat-actions/push-to-registry@v2
+ uses: redhat-actions/podman-login@v1
with:
- tags: ${{ steps.build-image.outputs.tags }}
+ registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- tls-verify: true
+
+ - name: Push image (with retry)
+ id: push-image
+ if: ${{ github.event_name != 'pull_request' }}
+ run: |
+ digest=""
+ while IFS= read -r tag; do
+ [ -z "$tag" ] && continue
+ for attempt in 1 2 3 4 5; do
+ if podman push --tls-verify=true \
+ --digestfile="$RUNNER_TEMP/digest.txt" \
+ "$tag"; then
+ digest="$(cat "$RUNNER_TEMP/digest.txt")"
+ break
+ fi
+ [ "$attempt" = 5 ] && exit 1
+ echo "Push attempt $attempt/5 failed for $tag, retrying in 30s..."
+ sleep 30
+ done
+ done <<< "${{ steps.build-image.outputs.tags }}"
+ echo "digest=$digest" >> "$GITHUB_OUTPUT"
- name: Export image digest
if: ${{ github.event_name != 'pull_request' }}