Skip to content

Commit

Permalink
Set if condition on conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Shakar Bakr <[email protected]>
  • Loading branch information
5h4k4r committed Oct 19, 2023
1 parent 05a0b27 commit ba180db
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ runs:
git push --set-upstream origin "$TARGET_BRANCH"
fi
# check if we have conflicts with main
git fetch
git rebase $TARGET_BRANCH
git checkout --theirs $TARGET_FILE
git add $TARGET_FILE
git rebase --continue
git push --force
if [ $? -ne 0 ]; then
git checkout --theirs $TARGET_FILE
git add $TARGET_FILE
git rebase --continue
git push --force
# Use the REST API to commit changes, so we get automatic commit signing
- name: Commit changes
Expand Down

0 comments on commit ba180db

Please sign in to comment.