From 921c817252dfa563cb0036ff894f8a0e14e6bd2c Mon Sep 17 00:00:00 2001 From: Erik Arvidsson Date: Wed, 3 Jun 2026 20:59:33 +0200 Subject: [PATCH] ci: fix Alpine arm64 prebuild (JS actions unsupported in Alpine container on arm64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/build.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de211c8..e2aa82e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,20 +220,27 @@ jobs: # free for public repos) instead of QEMU emulation. This is faster and avoids # the QEMU "illegal instruction" crashes seen with emulated musl/arm64. 32-bit # arm (arm/v7) is no longer built — Zero does not support it. + # Alpine (musl) arm64: GitHub doesn't support JavaScript actions inside an + # Alpine *job container* on arm64 runners (only x64), so actions/checkout + # fails there. Instead check out on the glibc arm64 host and run the build + # inside `docker run node:20-alpine` — native on the arm64 runner, so still no + # QEMU. prebuild-alpine-arm64: if: ${{ github.event_name == 'release' }} permissions: contents: write # prebuild -u uploads the .node assets to the GitHub release name: Prebuild on alpine (arm64) runs-on: ubuntu-24.04-arm - container: node:20-alpine needs: test steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev icu-dev --update-cache - - run: npm install --ignore-scripts - - run: ${{ env.NODE_BUILD_CMD_LEGACY }} -u ${{ secrets.GITHUB_TOKEN }} - - run: ${{ env.NODE_BUILD_CMD_MODERN }} -u ${{ secrets.GITHUB_TOKEN }} + - run: | + docker run --rm -v "$(pwd)":/tmp/project --entrypoint /bin/sh node:20-alpine -c "\ + apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev icu-dev --update-cache && \ + cd /tmp/project && \ + npm install --ignore-scripts && \ + ${{ env.NODE_BUILD_CMD_LEGACY }} -u ${{ secrets.GITHUB_TOKEN }} && \ + ${{ env.NODE_BUILD_CMD_MODERN }} -u ${{ secrets.GITHUB_TOKEN }}" prebuild-linux-arm64: if: ${{ github.event_name == 'release' }}