Skip to content

Fix build-and-push workflow failing with GHCR secondary rate limit - #48

Open
mythz with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-build-and-push-job
Open

Fix build-and-push workflow failing with GHCR secondary rate limit#48
mythz with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-build-and-push-job

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown

Pushing multiple tags (4.0.11, 4.0, 4, latest) to both GHCR and Docker Hub simultaneously with multi-platform (amd64+arm64) builds creates a burst of concurrent manifest requests that trips GitHub's secondary rate limit (HTTP 403).

Changes

  • Retry logic: Wrapped docker/build-push-action with Wandalen/wretry.action@v3 — retries up to 3× with a 60s delay, handling transient rate limit hits without manual re-runs
  • Action upgrade: docker/build-push-action v5 → v6
  • Digest extraction: wretry.action surfaces the wrapped action's outputs as a JSON blob in steps.build.outputs.outputs; added an explicit jq-based extraction step with a null guard before passing to attestation
- name: Build and push Docker image
  id: build
  uses: Wandalen/wretry.action@v3
  with:
    action: docker/build-push-action@v6
    with: |
      ...
    attempt_limit: 3
    attempt_delay: 60000

- name: Extract build digest
  id: digest
  run: |
    DIGEST=$(echo '${{ steps.build.outputs.outputs }}' | jq -r '.digest')
    if [ -z "$DIGEST" ] || [ "$DIGEST" = "null" ]; then
      echo "ERROR: Could not extract image digest from build outputs"
      exit 1
    fi
    echo "digest=$DIGEST" >> $GITHUB_OUTPUT

@mythz
mythz marked this pull request as ready for review August 18, 2026 13:52
Copilot AI and others added 2 commits August 18, 2026 13:53
Co-authored-by: mythz <89361+mythz@users.noreply.github.com>
Co-authored-by: mythz <89361+mythz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-and-push Fix build-and-push workflow failing with GHCR secondary rate limit Aug 18, 2026
Copilot AI requested a review from mythz August 18, 2026 13:56
Copilot AI and others added 2 commits August 18, 2026 14:07
Co-authored-by: mythz <89361+mythz@users.noreply.github.com>
Co-authored-by: mythz <89361+mythz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants