workflow: use merge instead of rebase
This commit is contained in:
parent
595a9761d0
commit
b0b6ef6bba
@ -16,10 +16,18 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: flake-updates
|
ref: flake-updates
|
||||||
|
|
||||||
- name: Fetch latest changes and rebase
|
- name: Git config
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
git config user.name "Gitea Actions"
|
||||||
git rebase origin/main
|
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
|
- name: Set up Nix
|
||||||
uses: cachix/install-nix-action@v31
|
uses: cachix/install-nix-action@v31
|
||||||
@ -30,12 +38,10 @@ jobs:
|
|||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Gitea Actions"
|
|
||||||
git config user.email "actions@gitea.local"
|
|
||||||
git add flake.lock
|
git add flake.lock
|
||||||
if git diff --cached --quiet; then
|
if git diff --cached --quiet; then
|
||||||
echo "No changes to commit."
|
echo "No changes to commit."
|
||||||
else
|
else
|
||||||
git commit -m "Update flake.lock $(date -I)"
|
git commit -m "Update flake.lock $(date -I)"
|
||||||
git push --force-with-lease origin flake-updates
|
git push origin flake-updates
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user