Cherry pick try-catch block to output results if build is failing (#90)
parent
e1be8325cd
commit
2656f4e108
File diff suppressed because one or more lines are too long
32
src/index.js
32
src/index.js
|
@ -16,22 +16,24 @@ async function action() {
|
||||||
} = Input.getFromUser();
|
} = Input.getFromUser();
|
||||||
const baseImage = ImageTag.createForBase({ version: unityVersion, customImage });
|
const baseImage = ImageTag.createForBase({ version: unityVersion, customImage });
|
||||||
|
|
||||||
// Build docker image
|
try {
|
||||||
const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
// Build docker image
|
||||||
|
const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
||||||
|
|
||||||
// Run docker image
|
// Run docker image
|
||||||
await Docker.run(actionImage, {
|
await Docker.run(actionImage, {
|
||||||
workspace,
|
workspace,
|
||||||
unityVersion,
|
unityVersion,
|
||||||
projectPath,
|
projectPath,
|
||||||
testMode,
|
testMode,
|
||||||
artifactsPath,
|
artifactsPath,
|
||||||
useHostNetwork,
|
useHostNetwork,
|
||||||
customParameters,
|
customParameters,
|
||||||
});
|
});
|
||||||
|
} finally {
|
||||||
// Set output
|
// Set output
|
||||||
await Output.setArtifactsPath(artifactsPath);
|
await Output.setArtifactsPath(artifactsPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
action().catch(error => {
|
action().catch(error => {
|
||||||
|
|
Loading…
Reference in New Issue