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 }}
|
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
working-directory: ./tools
|
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||||
run: |
|
|
||||||
cd ./crowdin
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
##### Download Chinese #####
|
##### Download Chinese #####
|
||||||
- name: Crowdin Download Chinese Translations
|
- name: Crowdin Download Chinese Translations
|
||||||
|
@ -17,10 +17,7 @@ jobs:
|
|||||||
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
working-directory: ./tools
|
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||||
run: |
|
|
||||||
cd ./crowdin
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
##### Download Chinese #####
|
##### Download Chinese #####
|
||||||
- name: Crowdin Download Chinese Translations
|
- name: Crowdin Download Chinese Translations
|
||||||
|
@ -15,10 +15,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
working-directory: ./tools
|
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||||
run: |
|
|
||||||
cd ./crowdin
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Crowdin Upload
|
- name: Crowdin Upload
|
||||||
uses: crowdin/github-action@master
|
uses: crowdin/github-action@master
|
||||||
|
@ -17,10 +17,7 @@ jobs:
|
|||||||
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
working-directory: ./tools
|
run: npm ci -w=tools/crowdin --ignore-scripts
|
||||||
run: |
|
|
||||||
cd ./crowdin
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
##### Download Chinese #####
|
##### Download Chinese #####
|
||||||
- name: Crowdin Download Chinese Translations
|
- 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
|
# this is a bit clunky, perhaps there's a more concise way of passing in build
|
||||||
# arguments
|
# arguments
|
||||||
@ -28,7 +28,7 @@ RUN npm run build:client
|
|||||||
WORKDIR /home/node/config
|
WORKDIR /home/node/config
|
||||||
RUN git clone https://github.com/freeCodeCamp/client-config.git client
|
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
|
RUN npm i -g serve
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node
|
WORKDIR /home/node
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM node:14.18.2-alpine as builder
|
FROM node:16-alpine as builder
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node/build
|
WORKDIR /home/node/build
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
@ -7,15 +7,13 @@ RUN npm ci --no-progress
|
|||||||
RUN npm run build:curriculum
|
RUN npm run build:curriculum
|
||||||
RUN npm run build:server
|
RUN npm run build:server
|
||||||
|
|
||||||
FROM node:14.18.2-alpine
|
FROM node:16-alpine
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node/api
|
WORKDIR /home/node/api
|
||||||
# get and install deps
|
# 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/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/
|
COPY --from=builder --chown=node:node /home/node/build/api-server/package.json api-server/
|
||||||
RUN npm ci --production --ignore-scripts --no-progress \
|
RUN npm ci --production -w=api-server --include-workspace-root --no-progress --ignore-scripts \
|
||||||
&& cd api-server \
|
|
||||||
&& npm ci --production --no-progress \
|
|
||||||
&& npm cache clean --force
|
&& 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/api-server/lib/ api-server/lib/
|
||||||
COPY --from=builder --chown=node:node /home/node/build/utils/ utils/
|
COPY --from=builder --chown=node:node /home/node/build/utils/ utils/
|
||||||
|
Reference in New Issue
Block a user