workflow: Simplify automatic merge conflict solving
This commit is contained in:
parent
489b839452
commit
8d9892e958
@ -34,12 +34,7 @@ jobs:
|
||||
if [ $commits_ahead -ne 0 ]
|
||||
then
|
||||
git fetch origin
|
||||
git merge --squash origin/main || true # do not exit script on merge conflict
|
||||
|
||||
# solve potential merge conflict by taking flake.lock from main
|
||||
git checkout --theirs flake.lock
|
||||
git add flake.lock
|
||||
|
||||
git merge -X theirs --squash origin/main
|
||||
git commit -m "Merge main branch squashed $(date -I)"
|
||||
else
|
||||
echo "Merge not necessary"
|
||||
|
Loading…
x
Reference in New Issue
Block a user