未验证 提交 e53d6bce 编写于 作者: A Asher

Forward GitHub token to docker build if it exists

上级 ce3b7dfb
......@@ -5,6 +5,7 @@ set -euo pipefail
function docker-build() {
local target="${TARGET:-}"
local image="codercom/nbin-${target}"
local token="${GITHUB_TOKEN:-}"
if [[ "${target}" == "linux" ]] ; then
image="codercom/nbin-centos"
fi
......@@ -26,7 +27,7 @@ function docker-build() {
local command="${1}" ; shift
local args="'${vscodeVersion}' '${codeServerVersion}' '${target}'"
docker exec "${containerId}" \
bash -c "cd /src && CI=true yarn ${command} ${args}"
bash -c "cd /src && CI=true GITHUB_TOKEN=${token} yarn ${command} ${args}"
}
docker cp ./. "${containerId}":/src
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册