From 50ea7003391494591ba49548ccabccd9b1be8d89 Mon Sep 17 00:00:00 2001 From: Muhammadcell Date: Sun, 7 Jun 2026 12:18:22 +0500 Subject: [PATCH] fix(ci): retry docker service builds --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c66d296..a489f7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,20 @@ jobs: uses: actions/checkout@v4 - name: Build service image - run: docker build apps/bot --file apps/bot/Dockerfile.service --build-arg SERVICE_NAME=${{ matrix.service }} + run: | + for attempt in 1 2 3; do + if docker build apps/bot --file apps/bot/Dockerfile.service --build-arg SERVICE_NAME=${{ matrix.service }}; then + exit 0 + fi + + if [ "$attempt" -eq 3 ]; then + echo "Docker build failed after ${attempt} attempts" + exit 1 + fi + + echo "Docker build failed on attempt ${attempt}; retrying in $((attempt * 10)) seconds" + sleep $((attempt * 10)) + done # ── Contract tests ──────────────────────────────────────────────────────── # Spins up the three stateful services against a real Postgres + Redis,