avoid building custom image

pull/177/head
Paul Pacheco 2022-03-29 09:29:27 -05:00
parent f87ed30c30
commit 1eee268eea
2 changed files with 9 additions and 3 deletions

View File

@ -24,10 +24,11 @@ async function run() {
try {
// Build docker image
const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
//const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
// Run docker image
await Docker.run(actionImage, {
await Docker.run(baseImage, {
actionFolder,
unityVersion,
workspace,
projectPath,

View File

@ -21,6 +21,7 @@ const Docker = {
async run(image, parameters, silent = false) {
const {
actionFolder,
unityVersion,
workspace,
projectPath,
@ -72,11 +73,15 @@ const Docker = {
--volume "${githubHome}":"/root:z" \
--volume "${githubWorkflow}":"/github/workflow:z" \
--volume "${workspace}":"/github/workspace:z" \
--volume "${actionFolder}/steps":"/steps" \
--volume "${artifactsPath}/entrypoint.sh":"/entrypoint.sh" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
${useHostNetwork ? '--net=host' : ''} \
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
${image}`;
${image} \
--
/entrypoint.sh` ;
await exec(command, undefined, { silent });
},