Skip to content

Commit 8d1e623

Browse files
committed
Secure pass GH_TOKEN
1 parent 97c5786 commit 8d1e623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
# syntax = docker/dockerfile:1.2
12
FROM node:14
23

34
ARG ENV
4-
ARG GH_TOKEN
55

66
WORKDIR /usr/src/notepadhandler
77

88
COPY package*.json ./
99
COPY .npmrc ./
1010

1111
#debug
12-
RUN if [ "$ENV" = "debug" ] ; then npm install ; else npm ci --only=production; fi
12+
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
1313

1414
COPY . .
1515

0 commit comments

Comments
 (0)