fix(ci): use corepack for yarn berry in frontend build
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 18s
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 18s
Enable corepack and run yarn via corepack in Dockerfile.frontend install/build steps so packageManager=yarn@4.10.3 works in CI.
This commit is contained in:
@@ -9,7 +9,7 @@ COPY frontend/package*.json ./
|
|||||||
COPY frontend/yarn.lock* frontend/pnpm-lock.yaml* ./
|
COPY frontend/yarn.lock* frontend/pnpm-lock.yaml* ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN if [ -f yarn.lock ]; then yarn install; \
|
RUN if [ -f yarn.lock ]; then corepack enable && corepack yarn install; \
|
||||||
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm install; \
|
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm install; \
|
||||||
else npm install; fi
|
else npm install; fi
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
|
|||||||
|
|
||||||
# Production build stage
|
# Production build stage
|
||||||
FROM base AS build
|
FROM base AS build
|
||||||
RUN if [ -f yarn.lock ]; then yarn build; \
|
RUN if [ -f yarn.lock ]; then corepack yarn build; \
|
||||||
elif [ -f pnpm-lock.yaml ]; then pnpm build; \
|
elif [ -f pnpm-lock.yaml ]; then pnpm build; \
|
||||||
else npm run build; fi
|
else npm run build; fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user