avoid building custom image
parent
f87ed30c30
commit
1eee268eea
|
@ -24,10 +24,11 @@ async function run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Build docker image
|
// Build docker image
|
||||||
const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
//const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
||||||
|
|
||||||
// Run docker image
|
// Run docker image
|
||||||
await Docker.run(actionImage, {
|
await Docker.run(baseImage, {
|
||||||
|
actionFolder,
|
||||||
unityVersion,
|
unityVersion,
|
||||||
workspace,
|
workspace,
|
||||||
projectPath,
|
projectPath,
|
||||||
|
|
|
@ -21,6 +21,7 @@ const Docker = {
|
||||||
|
|
||||||
async run(image, parameters, silent = false) {
|
async run(image, parameters, silent = false) {
|
||||||
const {
|
const {
|
||||||
|
actionFolder,
|
||||||
unityVersion,
|
unityVersion,
|
||||||
workspace,
|
workspace,
|
||||||
projectPath,
|
projectPath,
|
||||||
|
@ -72,11 +73,15 @@ const Docker = {
|
||||||
--volume "${githubHome}":"/root:z" \
|
--volume "${githubHome}":"/root:z" \
|
||||||
--volume "${githubWorkflow}":"/github/workflow:z" \
|
--volume "${githubWorkflow}":"/github/workflow:z" \
|
||||||
--volume "${workspace}":"/github/workspace:z" \
|
--volume "${workspace}":"/github/workspace:z" \
|
||||||
|
--volume "${actionFolder}/steps":"/steps" \
|
||||||
|
--volume "${artifactsPath}/entrypoint.sh":"/entrypoint.sh" \
|
||||||
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
||||||
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
|
${sshAgent ? '--volume /home/runner/.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'} \
|
||||||
${image}`;
|
${image} \
|
||||||
|
--
|
||||||
|
/entrypoint.sh` ;
|
||||||
|
|
||||||
await exec(command, undefined, { silent });
|
await exec(command, undefined, { silent });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue