Add gitPrivateToken support again (#377)
This commit is contained in:
committed by
GitHub
parent
40891d6b43
commit
2b399b2641
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -3291,7 +3291,7 @@ class Docker {
|
||||
});
|
||||
}
|
||||
static getLinuxCommand(image, parameters) {
|
||||
const { workspace, actionFolder, runnerTempPath, sshAgent } = parameters;
|
||||
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
|
||||
const githubHome = path_1.default.join(runnerTempPath, '_github_home');
|
||||
if (!fs_1.existsSync(githubHome))
|
||||
fs_1.mkdirSync(githubHome);
|
||||
@@ -3304,6 +3304,7 @@ class Docker {
|
||||
${image_environment_factory_1.default.getEnvVarString(parameters)} \
|
||||
--env UNITY_SERIAL \
|
||||
--env GITHUB_WORKSPACE=/github/workspace \
|
||||
${gitPrivateToken ? `--env GIT_PRIVATE_TOKEN="${gitPrivateToken}"` : ''} \
|
||||
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
|
||||
--volume "${githubHome}":"/root:z" \
|
||||
--volume "${githubWorkflow}":"/github/workflow:z" \
|
||||
@@ -3317,13 +3318,14 @@ class Docker {
|
||||
/bin/bash -c /entrypoint.sh`;
|
||||
}
|
||||
static getWindowsCommand(image, parameters) {
|
||||
const { workspace, actionFolder, unitySerial } = parameters;
|
||||
const { workspace, actionFolder, unitySerial, gitPrivateToken } = parameters;
|
||||
return `docker run \
|
||||
--workdir /github/workspace \
|
||||
--rm \
|
||||
${image_environment_factory_1.default.getEnvVarString(parameters)} \
|
||||
--env UNITY_SERIAL="${unitySerial}" \
|
||||
--env GITHUB_WORKSPACE=c:/github/workspace \
|
||||
${gitPrivateToken ? `--env GIT_PRIVATE_TOKEN="${gitPrivateToken}"` : ''} \
|
||||
--volume "${workspace}":"c:/github/workspace" \
|
||||
--volume "c:/regkeys":"c:/regkeys" \
|
||||
--volume "C:/Program Files (x86)/Microsoft Visual Studio":"C:/Program Files (x86)/Microsoft Visual Studio" \
|
||||
|
||||
Reference in New Issue
Block a user