Skip to content

Commit 17c5173

Browse files
committed
Use --build-arg for GitHub token
1 parent d0a08f6 commit 17c5173

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
dist: trusty
3737
env: DOCKER_BUILD="true"
3838
if: branch == master AND tag IS blank
39-
script: docker build -e GITHUB_TOKEN="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$VERSION" -t codercom/code-server:v2 .
39+
script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$VERSION" -t codercom/code-server:v2 .
4040

4141
git:
4242
depth: 3

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:10.16.0
22
ARG codeServerVersion=docker
33
ARG vscodeVersion
4+
ARG githubToken
45

56
# Install VS Code's deps. These are the only two it seems we need.
67
RUN apt-get update && apt-get install -y \
@@ -14,7 +15,7 @@ WORKDIR /src
1415
COPY . .
1516

1617
RUN yarn \
17-
&& MINIFY=true yarn build "${vscodeVersion}" "${codeServerVersion}" \
18+
&& MINIFY=true GITHUB_TOKEN="${githubToken}" yarn build "${vscodeVersion}" "${codeServerVersion}" \
1819
&& yarn binary "${vscodeVersion}" "${codeServerVersion}" \
1920
&& mv "/src/build/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64-built/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64" /src/build/code-server \
2021
&& rm -r /src/build/vscode-* \

0 commit comments

Comments
 (0)