Skip to content

Commit

Permalink
fix: capture exit_code either way (#284)
Browse files Browse the repository at this point in the history
when gh pr create succeeds, we want to set the exit_code=0
if it fails, we want to set it to exit_code=1 but not fail the step
  • Loading branch information
diogomatsubara authored Feb 14, 2025
1 parent a4b6d2a commit c1ec5a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/merge-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ jobs:
--base main \
--label internal \
-R ${{ matrix.repo }} \
2>&1)
exit_code=$?
2>&1) && exit_code=$? || exit_code=$?
echo "Exit code: ${exit_code} Output: ${output}"
if [[ ${exit_code} == 0 ]]; then
echo "pull-request-operation=created" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit c1ec5a7

Please sign in to comment.