Skip to content

Commit

Permalink
Fail pipeline when git push errors (#34)
Browse files Browse the repository at this point in the history
* Fail pipeline when git push errors

* readme

* revert unrelated change
  • Loading branch information
Ferror authored Oct 10, 2022
1 parent 3f775e2 commit f258435
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion entrypoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@
note($message);

exec("git commit --message '{$commitMessage}'");
exec('git push --quiet origin ' . $config->getBranch());
exec('git push --quiet origin ' . $config->getBranch(), $outputLines, $exitCode);

if ($exitCode > 0) {
error('Failed to push changes!');
exit($exitCode);
}
} else {
note('No files to change');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/packages/some-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This repository was split thanks to [symplify/monorepo-split-github-action](https://github.com/symplify/monorepo-split-github-action)!

Change me again
Change me again, and again, and again

0 comments on commit f258435

Please sign in to comment.