Skip to content

Commit 65ad600

Browse files
committed
change input name to reflect the type github private token
1 parent 5c8c30a commit 65ad600

File tree

8 files changed

+21
-23
lines changed

8 files changed

+21
-23
lines changed

action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,11 @@ inputs:
110110
required: false
111111
default: ''
112112
description: 'SSH Agent path to forward to the container'
113-
gitCredential:
113+
gitPrivateToken:
114114
required: false
115115
default: ''
116116
description: >
117-
Git credential configuration
118-
119-
example: https://$token@github.com/
117+
Github private token to pull from github
120118
chownFilesTo:
121119
required: false
122120
default: ''

dist/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/steps/set_gitcredential.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/usr/bin/env bash
22

3-
if [ -z "${GIT_CREDENTIAL}" ]
3+
if [ -z "${GIT_PRIVATE_TOKEN}" ]
44
then
5-
echo "GIT_CREDENTIAL unset skipping"
5+
echo "GIT_PRIVATE_TOKEN unset skipping"
66
else
7-
echo "GIT_CREDENTIAL is set configuring git credentials"
7+
echo "GIT_PRIVATE_TOKEN is set configuring git credentials"
88

99
git config --global credential.helper store
1010
git config --global --replace-all url.https://github.com/.insteadOf ssh://git@github.com/
1111
git config --global --add url.https://github.com/.insteadOf git@github.com
1212

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:"
1616

1717
fi
1818

src/model/__mocks__/input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const mockGetFromUser = jest.fn().mockResolvedValue({
1212
customParameters: '',
1313
sshAgent: '',
1414
chownFilesTo: '',
15-
gitCredential: '',
15+
gitPrivateToken: '',
1616
});
1717

1818
export default {

src/model/build-parameters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BuildParameters {
2323
public androidKeyaliasPass!: string;
2424
public customParameters!: string;
2525
public sshAgent!: string;
26-
public gitCredential!: string;
26+
public gitPrivateToken!: string;
2727
public remoteBuildCluster!: string;
2828
public awsStackName!: string;
2929
public kubeConfig!: string;
@@ -63,7 +63,7 @@ class BuildParameters {
6363
androidKeyaliasPass: Input.androidKeyaliasPass,
6464
customParameters: Input.customParameters,
6565
sshAgent: Input.sshAgent,
66-
gitCredential: Input.gitCredential,
66+
gitPrivateToken: Input.gitPrivateToken,
6767
chownFilesTo: Input.chownFilesTo,
6868
remoteBuildCluster: Input.remoteBuildCluster,
6969
awsStackName: Input.awsStackName,

src/model/docker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Docker {
3737
androidKeyaliasPass,
3838
customParameters,
3939
sshAgent,
40-
gitCredential,
40+
gitPrivateToken,
4141
chownFilesTo,
4242
} = parameters;
4343

@@ -81,7 +81,7 @@ class Docker {
8181
--env RUNNER_TOOL_CACHE \
8282
--env RUNNER_TEMP \
8383
--env RUNNER_WORKSPACE \
84-
--env GIT_CREDENTIAL="${gitCredential}" \
84+
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
8585
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
8686
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
8787
--volume "${runnerTempPath}/_github_home":"/root" \

src/model/input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class Input {
8989
return core.getInput('sshAgent') || '';
9090
}
9191

92-
static get gitCredential() {
93-
return core.getInput('gitCredential') || '';
92+
static get gitPrivateToken() {
93+
return core.getInput('gitPrivateToken') || '';
9494
}
9595

9696
static get chownFilesTo() {

0 commit comments

Comments
 (0)