Skip to content

Commit

Permalink
fix(rebase): don't push if rebase failed
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 21, 2022
1 parent a85fdc5 commit 621e80e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rebase/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ runs:
token: ${{ inputs.token }}

- name: 'Rebase'
id: rebase
shell: bash
run: |
git rebase "origin/${{ inputs.base }}"
git rebase "origin/${{ inputs.base }}" || echo '::set-output name=fail::true' && git rebase --abort
- name: 'Push'
shell: bash
if: steps.rebase.outputs.fail != 'true'
run: |
git push ${{ inputs.force == 'true' && "--force" }}

0 comments on commit 621e80e

Please sign in to comment.