Skip to content

Commit 5e5c503

Browse files
committed
Patch to fix rate limiting on AWS image downloads on Test action workflow
1 parent b986b79 commit 5e5c503

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,23 @@ jobs:
177177
- name: Wait for mock services
178178
run: npm run containers:wait
179179

180+
- name: Pre-pull Supabase storage image
181+
run: |
182+
set -euo pipefail
183+
image="public.ecr.aws/supabase/storage-api:v1.32.1"
184+
for attempt in 1 2 3 4 5 6; do
185+
echo "Attempt ${attempt}: pulling ${image}"
186+
if docker pull "${image}"; then
187+
echo "Pulled ${image} successfully"
188+
exit 0
189+
fi
190+
sleep_seconds=$((2 ** attempt))
191+
echo "Pull failed; sleeping ${sleep_seconds}s before retry"
192+
sleep "${sleep_seconds}"
193+
done
194+
echo "Failed to pull ${image} after multiple attempts" >&2
195+
exit 1
196+
180197
- name: Start Supabase stack
181198
run: npm run containers:supabase:start
182199

0 commit comments

Comments
 (0)