avoid building custom image
parent
f87ed30c30
commit
1eee268eea
|
@ -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,
|
||||
|
|
|
@ -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 });
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue