File tree Expand file tree Collapse file tree 4 files changed +3490
-5043
lines changed Expand file tree Collapse file tree 4 files changed +3490
-5043
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,24 @@ jobs:
16
16
uses : actions/setup-node@v4
17
17
with :
18
18
node-version : ' 18'
19
- cache : ' npm'
19
+ cache : ' pnpm'
20
+
21
+ - name : Install pnpm
22
+ uses : pnpm/action-setup@v4
23
+ with :
24
+ version : 9
20
25
21
26
- name : Install Dependencies
22
- run : npm ci
27
+ run : pnpm install --frozen-lockfile
23
28
24
29
- name : Run lint
25
- run : npm run lint
30
+ run : pnpm run lint
26
31
27
32
- name : Run test with coverage
28
- run : npm run test:cov
33
+ run : pnpm run test:cov
29
34
30
35
- name : Run Build
31
- run : npm run build
36
+ run : pnpm run build
32
37
33
38
docker :
34
39
runs-on : ubuntu-latest
39
44
uses : actions/setup-node@v4
40
45
with :
41
46
node-version : ' 18'
42
- cache : ' npm'
47
+ cache : ' pnpm'
48
+
49
+ - name : Install pnpm
50
+ uses : pnpm/action-setup@v4
51
+ with :
52
+ version : 9
43
53
44
54
- name : Build docker image
45
55
run : docker build -t typescript-project .
Original file line number Diff line number Diff line change 1
1
FROM node:24-alpine AS builder
2
2
3
+ # Install pnpm
4
+ RUN npm install -g pnpm
5
+
3
6
WORKDIR /app
4
7
COPY . .
5
- RUN npm install
6
- RUN npm run build
8
+ RUN pnpm install
9
+ RUN pnpm run build
7
10
8
11
FROM node:24-alpine AS production
9
12
13
+ # Install pnpm
14
+ RUN npm install -g pnpm
15
+
10
16
ARG NODE_ENV=production
11
17
RUN addgroup -S docker && adduser -S user -G docker
12
18
13
19
WORKDIR /app
14
20
15
- COPY --from=builder --chown=user:docker /app/package*.json ./
21
+ COPY --from=builder --chown=user:docker /app/package.json ./
22
+ COPY --from=builder --chown=user:docker /app/pnpm-lock.yaml ./
16
23
COPY --from=builder --chown=user:docker /app/dist ./dist
17
- RUN npm ci --omit=dev && npm cache clean --force
24
+ RUN pnpm install --frozen-lockfile --prod && pnpm store prune
18
25
19
26
USER user
20
27
You can’t perform that action at this time.
0 commit comments