File tree Expand file tree Collapse file tree 6 files changed +17521
-14316
lines changed Expand file tree Collapse file tree 6 files changed +17521
-14316
lines changed Original file line number Diff line number Diff line change 42
42
43
43
- name : 📥 Download deps
44
44
run : pnpm install --frozen-lockfile
45
+ env :
46
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }} # Use the NPM_TOKEN here
45
47
46
48
- name : 📀 Generate Prisma Client
47
49
run : pnpm run generate
Original file line number Diff line number Diff line change
1
+ //registry.npmjs.org/:_authToken = ${ NPM_TOKEN }
1
2
link-workspace-packages = false
2
- public-hoist-pattern[] = *prisma*
3
+ public-hoist-pattern[] = *prisma*
Original file line number Diff line number Diff line change 1
- v20.11.1
1
+ v20.11.1
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
10
10
FROM node:20.11.1-bullseye-slim@sha256:5a5a92b3a8d392691c983719dbdc65d9f30085d6dcd65376e7a32e6fe9bf4cbe AS base
11
11
RUN apt-get update && apt-get install -y openssl dumb-init
12
12
WORKDIR /triggerdotdev
13
+
14
+ # Copy .npmrc and use the NPM_TOKEN for private registry
15
+ ARG NPM_TOKEN
16
+ COPY .npmrc .npmrc
17
+ RUN if [ -f .npmrc ]; then \
18
+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc; \
19
+ fi
13
20
COPY --chown=node:node .gitignore .gitignore
14
21
COPY --from=pruner --chown=node:node /triggerdotdev/out/json/ .
15
22
COPY --from=pruner --chown=node:node /triggerdotdev/out/pnpm-lock.yaml ./pnpm-lock.yaml
@@ -21,6 +28,8 @@ WORKDIR /triggerdotdev
21
28
# Corepack is used to install pnpm
22
29
RUN corepack enable
23
30
ENV NODE_ENV development
31
+ # Copy .npmrc again for dev-deps stage
32
+ COPY .npmrc .npmrc
24
33
RUN pnpm install --ignore-scripts --no-frozen-lockfile
25
34
26
35
# # Production deps
@@ -29,6 +38,8 @@ WORKDIR /triggerdotdev
29
38
# Corepack is used to install pnpm
30
39
RUN corepack enable
31
40
ENV NODE_ENV production
41
+ # Copy .npmrc again for production-deps stage
42
+ COPY .npmrc .npmrc
32
43
RUN pnpm install --prod --no-frozen-lockfile
33
44
COPY --from=pruner --chown=node:node /triggerdotdev/internal-packages/database/prisma/schema.prisma /triggerdotdev/internal-packages/database/prisma/schema.prisma
34
45
# RUN pnpm add @prisma/[email protected] -w
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copy the .npmrc file into the build directory
4
+ echo " Copying .npmrc to build context..."
5
+ cp .npmrc /app/.npmrc
6
+
7
+ # Set the NPM_TOKEN environment variable for the build
8
+ export NPM_TOKEN=$1
9
+
10
+ # Run the npm install command
11
+ echo " Running npm install with NPM_TOKEN..."
12
+ pnpm install
You can’t perform that action at this time.
0 commit comments