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,