Skip to content

Commit 36cf8b2

Browse files
committed
fix(ci): verify Bun release without setup action
1 parent 92fb7a4 commit 36cf8b2

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,23 @@ jobs:
5757
with:
5858
node-version: "20"
5959
- name: Set up Bun
60-
# v2.2.0 moved the action runtime to node24, which caused a workflow
61-
# startup_failure before any job was instantiated on this runner path.
62-
# Keep the setup action on its Node-20-compatible release until the
63-
# runner accepts Node-24 actions; pin the installed Bun independently.
64-
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
65-
with:
66-
bun-version: "1.3.14"
60+
# The repository's selected-action path rejects setup-bun before job
61+
# instantiation (a zero-job startup_failure). Fetch the immutable Bun
62+
# release asset directly and verify the digest published by GitHub's
63+
# release API instead. The runtime never enters $HOME.
64+
env:
65+
BUN_VERSION: "1.3.14"
66+
BUN_LINUX_X64_SHA256: "951ee2aee855f08595aeec6225226a298d3fea83a3dcd6465c09cbccdf7e848f"
67+
run: |
68+
archive="$RUNNER_TEMP/bun-linux-x64.zip"
69+
install_dir="$RUNNER_TEMP/bun-runtime"
70+
curl --fail --location --retry 3 \
71+
--output "$archive" \
72+
"https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip"
73+
printf '%s %s\n' "$BUN_LINUX_X64_SHA256" "$archive" | sha256sum --check --strict
74+
unzip -q "$archive" -d "$install_dir"
75+
printf '%s\n' "$install_dir/bun-linux-x64" >> "$GITHUB_PATH"
76+
"$install_dir/bun-linux-x64/bun" --version
6777
- name: Install dependencies
6878
run: opam install . --deps-only --with-test --with-doc --yes
6979
- name: Install tree-sitter CLI (for res-to-affine walker tests)

0 commit comments

Comments
 (0)