Skip to content

Commit a1ef443

Browse files
noodaneeclaude
andcommitted
fix(ci): 使用 node:alpine 镜像替代 alpine:latest
将 linux-musl-x64 job 的基础镜像从 alpine:latest 改为 node:18-alpine,解决 Alpine 自带 npm 的兼容性问题。 node:18-alpine 镜像优势: - 预装经过测试的 Node.js 18 和 npm 版本 - 避免 apk 提供的 npm 版本存在的 "Exit handler never called" bug - 更稳定的依赖管理体验 - 移除了不必要的 npm 升级步骤 修复了持续出现的 npm install 失败问题。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 45fbaa9 commit a1ef443

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,15 @@ jobs:
195195
linux-musl-x64:
196196
runs-on: ubuntu-24.04
197197
container:
198-
image: alpine:latest
198+
image: node:18-alpine
199199
env:
200200
ZIG_TARGET: x86_64-linux-musl
201201
steps:
202202
- name: Checkout
203203
uses: actions/checkout@v4
204204

205205
- name: Install system dependencies
206-
run: apk add --no-cache nodejs npm bash build-base cmake ninja python3 curl unzip git autoconf automake libtool pkgconfig
207-
208-
- name: Upgrade npm
209-
run: npm install -g npm@latest
206+
run: apk add --no-cache bash build-base cmake ninja python3 curl unzip git autoconf automake libtool pkgconfig
210207

211208
- name: Setup Zig
212209
uses: mlugg/setup-zig@v2

0 commit comments

Comments
 (0)