Skip to content

Commit 71336b7

Browse files
committed
fix: add concurrency group and retry for manifest job
- Add concurrency group to serialize all manifest jobs across groups - Add retry with exponential backoff (10s, 20s, 30s, 40s, 50s) on failure - Prevents Docker Hub rate limit exhaustion from parallel manifest creation
1 parent 455587b commit 71336b7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/build-group.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
needs: build
6060
if: ${{ inputs.push && inputs.manifestCmds != '' }}
6161
runs-on: ubuntu-latest
62+
concurrency:
63+
group: docker-manifest
64+
cancel-in-progress: false
6265
steps:
6366
- uses: docker/login-action@v3
6467
with:
@@ -71,4 +74,13 @@ jobs:
7174
password: ${{ secrets.GITHUB_TOKEN }}
7275
- name: Create multi-arch manifests
7376
run: |
74-
echo '${{ inputs.manifestCmds }}' | xargs -P 1 -d '\n' -I {} sh -c '{}'
77+
echo '${{ inputs.manifestCmds }}' | while IFS= read -r cmd; do
78+
[ -z "$cmd" ] && continue
79+
for attempt in 1 2 3 4 5; do
80+
if eval "$cmd"; then
81+
break
82+
fi
83+
echo "Attempt $attempt failed, waiting ${attempt}0s..."
84+
sleep $((attempt * 10))
85+
done
86+
done

0 commit comments

Comments
 (0)