@@ -17,7 +17,7 @@ class Docker {
17
17
}
18
18
19
19
static getLinuxCommand ( image , parameters ) : string {
20
- const { workspace, actionFolder, runnerTempPath, sshAgent } = parameters ;
20
+ const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters ;
21
21
22
22
const githubHome = path . join ( runnerTempPath , '_github_home' ) ;
23
23
if ( ! existsSync ( githubHome ) ) mkdirSync ( githubHome ) ;
@@ -30,6 +30,7 @@ class Docker {
30
30
${ ImageEnvironmentFactory . getEnvVarString ( parameters ) } \
31
31
--env UNITY_SERIAL \
32
32
--env GITHUB_WORKSPACE=/github/workspace \
33
+ ${ gitPrivateToken ? `--env GIT_PRIVATE_TOKEN="${ gitPrivateToken } "` : '' } \
33
34
${ sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : '' } \
34
35
--volume "${ githubHome } ":"/root:z" \
35
36
--volume "${ githubWorkflow } ":"/github/workflow:z" \
@@ -44,13 +45,14 @@ class Docker {
44
45
}
45
46
46
47
static getWindowsCommand ( image : any , parameters : any ) : string {
47
- const { workspace, actionFolder, unitySerial } = parameters ;
48
+ const { workspace, actionFolder, unitySerial, gitPrivateToken } = parameters ;
48
49
return `docker run \
49
50
--workdir /github/workspace \
50
51
--rm \
51
52
${ ImageEnvironmentFactory . getEnvVarString ( parameters ) } \
52
53
--env UNITY_SERIAL="${ unitySerial } " \
53
54
--env GITHUB_WORKSPACE=c:/github/workspace \
55
+ ${ gitPrivateToken ? `--env GIT_PRIVATE_TOKEN="${ gitPrivateToken } "` : '' } \
54
56
--volume "${ workspace } ":"c:/github/workspace" \
55
57
--volume "c:/regkeys":"c:/regkeys" \
56
58
--volume "C:/Program Files (x86)/Microsoft Visual Studio":"C:/Program Files (x86)/Microsoft Visual Studio" \
0 commit comments