Skip to content

Commit e53d6bc

Browse files
committed
Forward GitHub token to docker build if it exists
1 parent ce3b7df commit e53d6bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/ci.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
function docker-build() {
66
local target="${TARGET:-}"
77
local image="codercom/nbin-${target}"
8+
local token="${GITHUB_TOKEN:-}"
89
if [[ "${target}" == "linux" ]] ; then
910
image="codercom/nbin-centos"
1011
fi
@@ -26,7 +27,7 @@ function docker-build() {
2627
local command="${1}" ; shift
2728
local args="'${vscodeVersion}' '${codeServerVersion}' '${target}'"
2829
docker exec "${containerId}" \
29-
bash -c "cd /src && CI=true yarn ${command} ${args}"
30+
bash -c "cd /src && CI=true GITHUB_TOKEN=${token} yarn ${command} ${args}"
3031
}
3132

3233
docker cp ./. "${containerId}":/src

0 commit comments

Comments
 (0)