Use --build-arg for GitHub token
This commit is contained in:
parent
d0a08f6dd7
commit
17c5173d8b
@ -36,7 +36,7 @@ jobs:
|
|||||||
dist: trusty
|
dist: trusty
|
||||||
env: DOCKER_BUILD="true"
|
env: DOCKER_BUILD="true"
|
||||||
if: branch == master AND tag IS blank
|
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:
|
git:
|
||||||
depth: 3
|
depth: 3
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
FROM node:10.16.0
|
FROM node:10.16.0
|
||||||
ARG codeServerVersion=docker
|
ARG codeServerVersion=docker
|
||||||
ARG vscodeVersion
|
ARG vscodeVersion
|
||||||
|
ARG githubToken
|
||||||
|
|
||||||
# Install VS Code's deps. These are the only two it seems we need.
|
# Install VS Code's deps. These are the only two it seems we need.
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
@ -14,7 +15,7 @@ WORKDIR /src
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn \
|
RUN yarn \
|
||||||
&& MINIFY=true yarn build "${vscodeVersion}" "${codeServerVersion}" \
|
&& MINIFY=true GITHUB_TOKEN="${githubToken}" yarn build "${vscodeVersion}" "${codeServerVersion}" \
|
||||||
&& yarn binary "${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 \
|
&& 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-* \
|
&& rm -r /src/build/vscode-* \
|
||||||
|
Loading…
Reference in New Issue
Block a user