File tree Expand file tree Collapse file tree 8 files changed +21
-23
lines changed Expand file tree Collapse file tree 8 files changed +21
-23
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,11 @@ inputs:
110
110
required : false
111
111
default : ' '
112
112
description : ' SSH Agent path to forward to the container'
113
- gitCredential :
113
+ gitPrivateToken :
114
114
required : false
115
115
default : ' '
116
116
description : >
117
- Git credential configuration
118
-
119
- example: https://$token@github.com/
117
+ Github private token to pull from github
120
118
chownFilesTo :
121
119
required : false
122
120
default : ' '
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- if [ -z " ${GIT_CREDENTIAL } " ]
3
+ if [ -z " ${GIT_PRIVATE_TOKEN } " ]
4
4
then
5
- echo " GIT_CREDENTIAL unset skipping"
5
+ echo " GIT_PRIVATE_TOKEN unset skipping"
6
6
else
7
- echo " GIT_CREDENTIAL is set configuring git credentials"
7
+ echo " GIT_PRIVATE_TOKEN is set configuring git credentials"
8
8
9
9
git config --global credential.helper store
10
10
git config --global --replace-all url.https://github.com/.insteadOf ssh://git@github.com/
11
11
git config --global --add url.https://github.com/.insteadOf git@github.com
12
12
13
- git config --global url." https://token:$GIT_CREDENTIAL @github.com/" .insteadOf " https://github.com/"
14
- git config --global url." https://ssh:$GIT_CREDENTIAL @github.com/" .insteadOf " ssh://git@github.com/"
15
- git config --global url." https://git:$GIT_CREDENTIAL @github.com/" .insteadOf " git@github.com:"
13
+ git config --global url." https://token:$GIT_PRIVATE_TOKEN @github.com/" .insteadOf " https://github.com/"
14
+ git config --global url." https://ssh:$GIT_PRIVATE_TOKEN @github.com/" .insteadOf " ssh://git@github.com/"
15
+ git config --global url." https://git:$GIT_PRIVATE_TOKEN @github.com/" .insteadOf " git@github.com:"
16
16
17
17
fi
18
18
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const mockGetFromUser = jest.fn().mockResolvedValue({
12
12
customParameters : '' ,
13
13
sshAgent : '' ,
14
14
chownFilesTo : '' ,
15
- gitCredential : '' ,
15
+ gitPrivateToken : '' ,
16
16
} ) ;
17
17
18
18
export default {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class BuildParameters {
23
23
public androidKeyaliasPass ! : string ;
24
24
public customParameters ! : string ;
25
25
public sshAgent ! : string ;
26
- public gitCredential ! : string ;
26
+ public gitPrivateToken ! : string ;
27
27
public remoteBuildCluster ! : string ;
28
28
public awsStackName ! : string ;
29
29
public kubeConfig ! : string ;
@@ -63,7 +63,7 @@ class BuildParameters {
63
63
androidKeyaliasPass : Input . androidKeyaliasPass ,
64
64
customParameters : Input . customParameters ,
65
65
sshAgent : Input . sshAgent ,
66
- gitCredential : Input . gitCredential ,
66
+ gitPrivateToken : Input . gitPrivateToken ,
67
67
chownFilesTo : Input . chownFilesTo ,
68
68
remoteBuildCluster : Input . remoteBuildCluster ,
69
69
awsStackName : Input . awsStackName ,
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Docker {
37
37
androidKeyaliasPass,
38
38
customParameters,
39
39
sshAgent,
40
- gitCredential ,
40
+ gitPrivateToken ,
41
41
chownFilesTo,
42
42
} = parameters ;
43
43
@@ -81,7 +81,7 @@ class Docker {
81
81
--env RUNNER_TOOL_CACHE \
82
82
--env RUNNER_TEMP \
83
83
--env RUNNER_WORKSPACE \
84
- --env GIT_CREDENTIAL ="${ gitCredential } " \
84
+ --env GIT_PRIVATE_TOKEN ="${ gitPrivateToken } " \
85
85
${ sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : '' } \
86
86
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
87
87
--volume "${ runnerTempPath } /_github_home":"/root" \
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ class Input {
89
89
return core . getInput ( 'sshAgent' ) || '' ;
90
90
}
91
91
92
- static get gitCredential ( ) {
93
- return core . getInput ( 'gitCredential ' ) || '' ;
92
+ static get gitPrivateToken ( ) {
93
+ return core . getInput ( 'gitPrivateToken ' ) || '' ;
94
94
}
95
95
96
96
static get chownFilesTo ( ) {
You can’t perform that action at this time.
0 commit comments