Skip to content

Commit 965ce66

Browse files
committed
Secure pass GH_TOKEN
1 parent d953c8a commit 965ce66

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
FROM node:14
22

33
ARG ENV
4-
ARG GH_TOKEN
54

65
WORKDIR /usr/src/noteshandler
76

87
COPY package*.json ./
98
COPY .npmrc ./
109

1110
#debug
12-
RUN if [ "$ENV" = "debug" ] ; then npm install ; else npm ci --only=production; fi
11+
RUN --mount=type=secret,id=GH_TOKEN export GH_TOKEN=`cat /run/secrets/GH_TOKEN`; if [ "$ENV" = "debug" ] ; then npm install ; else npm ci --only=production; fi
1312

1413
COPY . .
1514

0 commit comments

Comments
 (0)