Mount .ssh/known_hosts from user home directory to support self-hosted runners
parent
cfa9076acb
commit
a876a13576
|
@ -22,6 +22,12 @@ source /steps/return_license.sh
|
||||||
|
|
||||||
rm -r "$ACTIVATE_LICENSE_PATH"
|
rm -r "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create base .ssh directory
|
||||||
|
#
|
||||||
|
|
||||||
|
mkdir -m 700 -p ~/.ssh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Instructions for debugging
|
# Instructions for debugging
|
||||||
#
|
#
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -77,6 +77,7 @@ const Docker = {
|
||||||
const testPlatforms = (
|
const testPlatforms = (
|
||||||
testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode]
|
testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode]
|
||||||
).join(';');
|
).join(';');
|
||||||
|
const runnerUserHome = process.env['HOME'];
|
||||||
|
|
||||||
return `docker run \
|
return `docker run \
|
||||||
--workdir /github/workspace \
|
--workdir /github/workspace \
|
||||||
|
@ -121,7 +122,9 @@ const Docker = {
|
||||||
--volume "${actionFolder}/unity-config:/usr/share/unity3d/config/:z" \
|
--volume "${actionFolder}/unity-config:/usr/share/unity3d/config/:z" \
|
||||||
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
||||||
${
|
${
|
||||||
sshAgent ? `--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro` : ''
|
sshAgent
|
||||||
|
? `--volume ${runnerUserHome}/.ssh/known_hosts:/root/.ssh/known_hosts:ro`
|
||||||
|
: ''
|
||||||
} \
|
} \
|
||||||
${useHostNetwork ? '--net=host' : ''} \
|
${useHostNetwork ? '--net=host' : ''} \
|
||||||
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
||||||
|
|
Loading…
Reference in New Issue