workflow: Simplify automatic merge conflict solving

This commit is contained in:
Julian Mutter 2025-03-22 09:03:05 +01:00
parent 489b839452
commit 8d9892e958

View File

@ -34,12 +34,7 @@ jobs:
if [ $commits_ahead -ne 0 ] if [ $commits_ahead -ne 0 ]
then then
git fetch origin git fetch origin
git merge --squash origin/main || true # do not exit script on merge conflict git merge -X theirs --squash origin/main
# solve potential merge conflict by taking flake.lock from main
git checkout --theirs flake.lock
git add flake.lock
git commit -m "Merge main branch squashed $(date -I)" git commit -m "Merge main branch squashed $(date -I)"
else else
echo "Merge not necessary" echo "Merge not necessary"