workflow: use rebase instead of merge

This commit is contained in:
Julian Mutter 2025-03-23 18:51:49 +01:00
parent c9862e6efc
commit fc412f2596

View File

@ -30,14 +30,13 @@ jobs:
git log --oneline -5 git log --oneline -5
echo "----------" echo "----------"
git log --oneline -5 origin/main git log --oneline -5 origin/main
echo .
if [ $commits_ahead -ne 0 ] if [ $commits_ahead -ne 0 ]
then then
git fetch origin git rebase -X theirs origin/main
git merge -X theirs --squash origin/main
git commit -m "Merge main branch squashed $(date -I)"
else else
echo "Merge not necessary" echo "Rebase not necessary"
fi fi
- name: Set up Nix - name: Set up Nix
@ -54,4 +53,4 @@ jobs:
git diff --cached --quiet && echo "No changes to commit." && exit 0 git diff --cached --quiet && echo "No changes to commit." && exit 0
git commit -m "Update flake.lock $(date -I)" git commit -m "Update flake.lock $(date -I)"
git push origin flake-updates git push --force-with-lease origin flake-updates