CI 提速:引入按 lock hash 的依赖镜像缓存

This commit is contained in:
2026-03-03 16:54:43 +08:00
parent a61081fca9
commit 57dd743fc1
2 changed files with 37 additions and 35 deletions
+8
View File
@@ -0,0 +1,8 @@
ARG CI_IMAGE=mcr.microsoft.com/playwright:v1.51.1-jammy
FROM ${CI_IMAGE}
ARG NPM_REGISTRY=https://registry.npmmirror.com
WORKDIR /workspace
COPY package.json package-lock.json ./
RUN npm config set registry ${NPM_REGISTRY} && npm ci --prefer-offline --no-audit --progress=false