Skip to content

Commit 74bc6b9

Browse files
committed
feat: enable corepack for npm version management in Dockerfile and CI
1 parent 10c35b1 commit 74bc6b9

31 files changed

Lines changed: 1798 additions & 357 deletions

‎.gitlab-ci.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ test-node:
4646
- C0_ACTION: !reference [.node-actions]
4747
script:
4848
- cd actions/$C0_ACTION
49+
- corepack enable npm
4950
- npm ci
5051
- npm run typecheck
5152
- npm run test

‎actions/ai-action/Dockerfile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ WORKDIR /app
44

55
COPY package.json package-lock.json* ./
66

7+
# Pins npm to the version package.json declares, so the lock is read by the
8+
# same npm that wrote it.
9+
RUN corepack enable npm
10+
711
RUN npm ci
812

913
COPY . .

‎actions/ai-action/package-lock.json‎

Lines changed: 152 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎actions/ai-action/package.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"version": "1.0.0",
44
"private": true,
55
"type": "module",
6+
"packageManager": "npm@11.21.3",
7+
"engines": {
8+
"npm": ">=11.21.3"
9+
},
610
"main": "dist/index.js",
711
"scripts": {
812
"dev": "tsx watch src/index.ts",

‎actions/discord-action/Dockerfile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ WORKDIR /app
44

55
COPY package.json package-lock.json* ./
66

7+
# Pins npm to the version package.json declares, so the lock is read by the
8+
# same npm that wrote it.
9+
RUN corepack enable npm
10+
711
RUN npm ci
812

913
COPY . .

0 commit comments

Comments
 (0)