Skip to content

Commit 6f316b1

Browse files
arvclaude
andauthored
ci: fix Alpine arm64 prebuild (JS actions unsupported in Alpine container on arm64) (#41)
The native-arm64 conversion used `container: node:20-alpine`, but GitHub only supports JavaScript actions (actions/checkout) inside Alpine job containers on x64 runners — on arm64 it fails with "JavaScript Actions in Alpine containers are only supported on x64 Linux runners". The glibc arm64 jobs (bullseye/ bookworm) are unaffected. Check out on the glibc arm64 host instead and run the build inside `docker run node:20-alpine`, which is native on the arm64 runner (still no QEMU). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e59f6d6 commit 6f316b1

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,20 +220,27 @@ jobs:
220220
# free for public repos) instead of QEMU emulation. This is faster and avoids
221221
# the QEMU "illegal instruction" crashes seen with emulated musl/arm64. 32-bit
222222
# arm (arm/v7) is no longer built — Zero does not support it.
223+
# Alpine (musl) arm64: GitHub doesn't support JavaScript actions inside an
224+
# Alpine *job container* on arm64 runners (only x64), so actions/checkout
225+
# fails there. Instead check out on the glibc arm64 host and run the build
226+
# inside `docker run node:20-alpine` — native on the arm64 runner, so still no
227+
# QEMU.
223228
prebuild-alpine-arm64:
224229
if: ${{ github.event_name == 'release' }}
225230
permissions:
226231
contents: write # prebuild -u uploads the .node assets to the GitHub release
227232
name: Prebuild on alpine (arm64)
228233
runs-on: ubuntu-24.04-arm
229-
container: node:20-alpine
230234
needs: test
231235
steps:
232236
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
233-
- run: apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev icu-dev --update-cache
234-
- run: npm install --ignore-scripts
235-
- run: ${{ env.NODE_BUILD_CMD_LEGACY }} -u ${{ secrets.GITHUB_TOKEN }}
236-
- run: ${{ env.NODE_BUILD_CMD_MODERN }} -u ${{ secrets.GITHUB_TOKEN }}
237+
- run: |
238+
docker run --rm -v "$(pwd)":/tmp/project --entrypoint /bin/sh node:20-alpine -c "\
239+
apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev icu-dev --update-cache && \
240+
cd /tmp/project && \
241+
npm install --ignore-scripts && \
242+
${{ env.NODE_BUILD_CMD_LEGACY }} -u ${{ secrets.GITHUB_TOKEN }} && \
243+
${{ env.NODE_BUILD_CMD_MODERN }} -u ${{ secrets.GITHUB_TOKEN }}"
237244
238245
prebuild-linux-arm64:
239246
if: ${{ github.event_name == 'release' }}

0 commit comments

Comments
 (0)