From 0acaa4314b2355cb29f6b2ecc9fc7aaaa3a7af9f Mon Sep 17 00:00:00 2001 From: dconco Date: Tue, 24 Dec 2024 19:12:51 +0100 Subject: [PATCH] Refactor GitHub Actions workflow to streamline main branch updates --- .github/workflows/tests.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 12095ff..4fae09f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,18 +58,11 @@ jobs: - name: Push changes to main run: | - git config --global user.email "onipededavid208@gmail.com" - git config --global user.name "dconco" - - git fetch origin main dev # Fetch only main and dev branches + git fetch origin main dev git checkout main git config pull.rebase false - git pull origin main # Get latest changes on main - - # Now merge dev into main, allowing unrelated histories if necessary + git pull origin main git merge origin/dev --allow-unrelated-histories --no-ff - - # Push to main git push origin main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}