diff --git a/create-deployment.js b/create-deployment.js index 2e8f67e..99898f1 100644 --- a/create-deployment.js +++ b/create-deployment.js @@ -161,6 +161,5 @@ exports.createDeployment = async function(applicationName, fullRepositoryName, b console.log('🥳 Deployment successful'); } catch (e) { core.setFailed(`😱 The deployment ${deploymentId} seems to have failed.`); - throw e; } } diff --git a/dist/index.js b/dist/index.js index f1d08a2..2ae29bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -177,7 +177,6 @@ exports.createDeployment = async function(applicationName, fullRepositoryName, b console.log('🥳 Deployment successful'); } catch (e) { core.setFailed(`😱 The deployment ${deploymentId} seems to have failed.`); - throw e; } } @@ -211,8 +210,11 @@ exports.createDeployment = async function(applicationName, fullRepositoryName, b const runNumber = process.env['github_run_number'] || process.env['GITHUB_RUN_NUMBER']; try { - action.createDeployment(applicationName, fullRepositoryName, branchName, configLookupName, commitId, runNumber, skipSequenceCheck, core); - } catch (e) {} + await action.createDeployment(applicationName, fullRepositoryName, branchName, configLookupName, commitId, runNumber, skipSequenceCheck, core); + } catch (e) { + console.log(`👉🏻 ${e.message}`); + process.exit(1); + } })(); diff --git a/index.js b/index.js index 76e3552..02c48d6 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,9 @@ const runNumber = process.env['github_run_number'] || process.env['GITHUB_RUN_NUMBER']; try { - action.createDeployment(applicationName, fullRepositoryName, branchName, configLookupName, commitId, runNumber, skipSequenceCheck, core); - } catch (e) {} + await action.createDeployment(applicationName, fullRepositoryName, branchName, configLookupName, commitId, runNumber, skipSequenceCheck, core); + } catch (e) { + console.log(`👉🏻 ${e.message}`); + process.exit(1); + } })();