add private github package support using personal access token (#152)

* add private github package support using pat

* add index.js after yarn build

* shift gitcrediental step before run_tests
This commit is contained in:
Robin
2021-11-03 10:25:06 +01:00
committed by GitHub
parent a2b1ed6631
commit 576ef39bb6
7 changed files with 35 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ class Docker {
customParameters,
sshAgent,
githubToken,
gitPrivateToken,
} = parameters;
const command = `docker run \
@@ -58,6 +59,7 @@ class Docker {
--env RUNNER_TOOL_CACHE \
--env RUNNER_TEMP \
--env RUNNER_WORKSPACE \
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "/home/runner/work/_temp/_github_home":"/root" \

View File

@@ -25,6 +25,7 @@ class Input {
const sshAgent = getInput('sshAgent') || '';
const githubToken = getInput('githubToken') || '';
const checkName = getInput('checkName') || 'Test Results';
const gitPrivateToken = getInput('gitPrivateToken') || '';
// Validate input
if (!includes(this.testModes, testMode)) {
@@ -62,6 +63,7 @@ class Input {
sshAgent,
githubToken,
checkName,
gitPrivateToken,
};
}
}