Skip to content

Commit 06a4e2a

Browse files
committed
ci: retry bun install in setup action
Retry transient Bun dependency installation failures in CI setup before failing the job. Proof of fix: CI job 84095018943 failed while downloading @effect/platform during bun install; local shell syntax and bun install --frozen-lockfile both pass after adding bounded retries.
1 parent 5dc13bc commit 06a4e2a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/actions/setup/action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,15 @@ runs:
5757
run: npm install -g node-gyp
5858
- name: Install dependencies
5959
shell: bash
60-
run: bun install --frozen-lockfile
60+
run: |
61+
for attempt in 1 2 3; do
62+
if bun install --frozen-lockfile; then
63+
exit 0
64+
fi
65+
if [[ "$attempt" == "3" ]]; then
66+
echo "bun install failed after retries" >&2
67+
exit 1
68+
fi
69+
echo "bun install attempt ${attempt} failed; retrying..." >&2
70+
sleep $((attempt * 2))
71+
done

0 commit comments

Comments
 (0)