Cherry pick try-catch block to output results if build is failing (#90)

pull/91/head
Vladimir Kryukov 2021-01-17 23:55:27 +03:00 committed by GitHub
parent e1be8325cd
commit 2656f4e108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,7 @@ async function action() {
} = Input.getFromUser(); } = Input.getFromUser();
const baseImage = ImageTag.createForBase({ version: unityVersion, customImage }); const baseImage = ImageTag.createForBase({ version: unityVersion, customImage });
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 });
@ -29,10 +30,11 @@ async function action() {
useHostNetwork, useHostNetwork,
customParameters, customParameters,
}); });
} finally {
// Set output // Set output
await Output.setArtifactsPath(artifactsPath); await Output.setArtifactsPath(artifactsPath);
} }
}
action().catch(error => { action().catch(error => {
core.setFailed(error.message); core.setFailed(error.message);