From b0b6ef6bbabe5cae53f6be606b631f405da5afe6 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Sat, 22 Mar 2025 08:34:16 +0100 Subject: [PATCH] workflow: use merge instead of rebase --- .gitea/workflows/update-flake.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/update-flake.yaml b/.gitea/workflows/update-flake.yaml index 0f6bc1e..bfc6059 100644 --- a/.gitea/workflows/update-flake.yaml +++ b/.gitea/workflows/update-flake.yaml @@ -16,10 +16,18 @@ jobs: fetch-depth: 0 ref: flake-updates - - name: Fetch latest changes and rebase + - name: Git config + shell: bash run: | - git fetch origin - git rebase origin/main + git config user.name "Gitea Actions" + git config user.email "actions@gitea.local" + + - name: Merge main branch + run: | + git merge --squash origin/main + # solve merge conflict by taking flake.lock from main + git checkout origin/main -- flake.lock + git commit -m "Merge main branch squashed $(date -I)" - name: Set up Nix uses: cachix/install-nix-action@v31 @@ -30,12 +38,10 @@ jobs: - name: Commit and push changes shell: bash run: | - git config user.name "Gitea Actions" - git config user.email "actions@gitea.local" git add flake.lock if git diff --cached --quiet; then echo "No changes to commit." else git commit -m "Update flake.lock $(date -I)" - git push --force-with-lease origin flake-updates + git push origin flake-updates fi