Using SSH_AUTH_SOCK (ssh agent forwarding) to pull upm private repos (#256)

* using SSH_AUTH_SOCK (ssh agent forwarding) to pull upm private repos

* sshAgent as input parameter

* yarn run prettier --write "src/**/*.{js,ts}"

* yarn run lint --fix && yarn build

* fixed compilation after rebase

* removed RUN apt-get update && apt-get install -y openssh-client. This change needs to be done upstream. See game-ci/docker#117
This commit is contained in:
ivan-hernandez-scopely
2021-05-28 23:51:10 +02:00
committed by GitHub
parent 71ca7bdbfc
commit 497f2f7b5f
7 changed files with 2211 additions and 2189 deletions

View File

@@ -36,6 +36,7 @@ class Docker {
androidKeyaliasName,
androidKeyaliasPass,
customParameters,
sshAgent,
chownFilesTo,
} = parameters;
@@ -79,10 +80,13 @@ class Docker {
--env RUNNER_TOOL_CACHE \
--env RUNNER_TEMP \
--env RUNNER_WORKSPACE \
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "${runnerTempPath}/_github_home":"/root" \
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
--volume "${workspace}":"/github/workspace" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
${image}`;
await exec(command, undefined, { silent });