fix: update npm calls to handle workspaces (#44370)
* fix: use workspaces for crowdin npm ci * fix: update server.Dockerfile to use workspaces * fix: update client.Dockerfile to use workspaces
This commit is contained in:
committed by
GitHub
parent
e262301ac8
commit
9c078ab5d2
@ -17,10 +17,7 @@ jobs:
|
||||
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: ./tools
|
||||
run: |
|
||||
cd ./crowdin
|
||||
npm ci
|
||||
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||
|
||||
##### Download Chinese #####
|
||||
- name: Crowdin Download Chinese Translations
|
||||
|
@ -17,10 +17,7 @@ jobs:
|
||||
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: ./tools
|
||||
run: |
|
||||
cd ./crowdin
|
||||
npm ci
|
||||
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||
|
||||
##### Download Chinese #####
|
||||
- name: Crowdin Download Chinese Translations
|
||||
|
@ -15,10 +15,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: ./tools
|
||||
run: |
|
||||
cd ./crowdin
|
||||
npm ci
|
||||
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||
|
||||
- name: Crowdin Upload
|
||||
uses: crowdin/github-action@master
|
||||
|
@ -17,10 +17,7 @@ jobs:
|
||||
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: ./tools
|
||||
run: |
|
||||
cd ./crowdin
|
||||
npm ci
|
||||
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||
|
||||
##### Download Chinese #####
|
||||
- name: Crowdin Download Chinese Translations
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:14.18.2-buster AS builder
|
||||
FROM node:16-buster AS builder
|
||||
|
||||
# this is a bit clunky, perhaps there's a more concise way of passing in build
|
||||
# arguments
|
||||
@ -28,7 +28,7 @@ RUN npm run build:client
|
||||
WORKDIR /home/node/config
|
||||
RUN git clone https://github.com/freeCodeCamp/client-config.git client
|
||||
|
||||
FROM node:14.18.2-alpine
|
||||
FROM node:16-alpine
|
||||
RUN npm i -g serve
|
||||
USER node
|
||||
WORKDIR /home/node
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:14.18.2-alpine as builder
|
||||
FROM node:16-alpine as builder
|
||||
USER node
|
||||
WORKDIR /home/node/build
|
||||
COPY --chown=node:node . .
|
||||
@ -7,15 +7,13 @@ RUN npm ci --no-progress
|
||||
RUN npm run build:curriculum
|
||||
RUN npm run build:server
|
||||
|
||||
FROM node:14.18.2-alpine
|
||||
FROM node:16-alpine
|
||||
USER node
|
||||
WORKDIR /home/node/api
|
||||
# get and install deps
|
||||
COPY --from=builder --chown=node:node /home/node/build/package.json /home/node/build/package-lock.json ./
|
||||
COPY --from=builder --chown=node:node /home/node/build/api-server/package.json /home/node/build/api-server/package-lock.json api-server/
|
||||
RUN npm ci --production --ignore-scripts --no-progress \
|
||||
&& cd api-server \
|
||||
&& npm ci --production --no-progress \
|
||||
COPY --from=builder --chown=node:node /home/node/build/api-server/package.json api-server/
|
||||
RUN npm ci --production -w=api-server --include-workspace-root --no-progress --ignore-scripts \
|
||||
&& npm cache clean --force
|
||||
COPY --from=builder --chown=node:node /home/node/build/api-server/lib/ api-server/lib/
|
||||
COPY --from=builder --chown=node:node /home/node/build/utils/ utils/
|
||||
|
Reference in New Issue
Block a user