1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 21:25:25 +00:00

Use --build-arg for GitHub token

This commit is contained in:
Asher 2019-09-17 14:00:51 -05:00
parent d0a08f6dd7
commit 17c5173d8b
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@ jobs:
dist: trusty
env: DOCKER_BUILD="true"
if: branch == master AND tag IS blank
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 .
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 .
git:
depth: 3

View File

@ -1,6 +1,7 @@
FROM node:10.16.0
ARG codeServerVersion=docker
ARG vscodeVersion
ARG githubToken
# Install VS Code's deps. These are the only two it seems we need.
RUN apt-get update && apt-get install -y \
@ -14,7 +15,7 @@ WORKDIR /src
COPY . .
RUN yarn \
&& MINIFY=true yarn build "${vscodeVersion}" "${codeServerVersion}" \
&& MINIFY=true GITHUB_TOKEN="${githubToken}" yarn build "${vscodeVersion}" "${codeServerVersion}" \
&& yarn binary "${vscodeVersion}" "${codeServerVersion}" \
&& mv "/src/build/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64-built/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64" /src/build/code-server \
&& rm -r /src/build/vscode-* \