From 206a4e313a58d868e56629ca59a29a5d8e0105ea Mon Sep 17 00:00:00 2001 From: Justin Elias <16806192+justin-elias@users.noreply.github.com> Date: Sun, 26 Jul 2020 19:09:30 -0600 Subject: [PATCH] fix: fail action on push rejection --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 713819c..a06b21a 100644 --- a/src/index.js +++ b/src/index.js @@ -116,7 +116,11 @@ async function run() { await git.createTag(gitTag) core.info('Push all changes') - await git.push() + try{ + await git.push() + }catch (error) { + core.setFailed(error.message) + } // Set outputs so other actions (for example actions/create-release) can use it core.setOutput('changelog', stringChangelog)