From d049d21db69f93af3d37bdeb5f763c043595b4e7 Mon Sep 17 00:00:00 2001 From: c0rtexR <180119760+c0rtexR@users.noreply.github.com> Date: Fri, 18 Oct 2024 02:29:24 +0200 Subject: [PATCH] chore: merge dev into main for linear history. --- .github/workflows/sync-dev-main.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/sync-dev-main.yml b/.github/workflows/sync-dev-main.yml index 6c5b1fc..e418983 100644 --- a/.github/workflows/sync-dev-main.yml +++ b/.github/workflows/sync-dev-main.yml @@ -31,24 +31,20 @@ jobs: ssh-keyscan github.com >> ~/.ssh/known_hosts - name: Fetch all branches - run: git fetch origin - - - name: Checkout main branch - run: git checkout main - - - name: Rebase development onto main run: | - git checkout development - git rebase main + git fetch --all + git fetch --tags - - name: Push changes to main + - name: Update main branch run: | git checkout main - git merge development --ff-only - git push git@github.com:${GITHUB_REPOSITORY}.git main + git reset --hard origin/main + git merge --ff-only origin/development + git push origin main - - name: Handle rebase conflicts + - name: Handle merge conflicts if: failure() run: | - echo "⚠️ There was a conflict during the rebase. Please resolve it manually." + echo "⚠️ There was a conflict during the merge. Please resolve it manually." + git merge --abort exit 1