From 3e1bbb5346a6c08fe8691278ba023fcfdee2adf4 Mon Sep 17 00:00:00 2001 From: Dustin Updyke Date: Wed, 12 Aug 2026 15:26:00 +0000 Subject: [PATCH] updates api builder action --- .github/workflows/api.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 62bbb9191..086c6d7b2 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -12,6 +12,10 @@ on: types: [published] workflow_dispatch: +concurrency: + group: api-${{ github.ref }} + cancel-in-progress: true + jobs: docker: name: Docker Build & Push @@ -22,6 +26,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker metadata id: meta uses: docker/metadata-action@v5 @@ -43,6 +50,26 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push + id: push + continue-on-error: true + uses: docker/build-push-action@v6 + with: + context: ./src + file: ./src/Dockerfile-api + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + provenance: false + cache-from: type=gha + cache-to: type=gha,mode=max + + # GHCR secondary rate limits ask callers to wait a few minutes and retry + - name: Wait out GHCR rate limit + if: steps.push.outcome == 'failure' + run: sleep 180 + + - name: Build and push (retry) + if: steps.push.outcome == 'failure' uses: docker/build-push-action@v6 with: context: ./src @@ -50,3 +77,6 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + provenance: false + cache-from: type=gha + cache-to: type=gha,mode=max