fix(build): pin npm in Docker deps
Build Push and Deploy / docker-image (push) Failing after 1m15s
Build Push and Deploy / deploy-fallback-log (push) Successful in 0s

This commit is contained in:
2026-07-08 18:54:57 +08:00
parent cf6386d209
commit 758100b345
+4 -1
View File
@@ -4,11 +4,14 @@ FROM base AS deps
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
ARG NPM_VERSION=10.9.8
RUN npm install -g "npm@${NPM_VERSION}"
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
RUN \ RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \ elif [ -f package-lock.json ]; then npm ci --no-audit --no-fund; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi