From d4dc58bbb18c01b96474a44d580f14f496eafbf9 Mon Sep 17 00:00:00 2001 From: dconco Date: Tue, 24 Dec 2024 19:06:57 +0100 Subject: [PATCH 1/3] s --- .github/workflows/tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 935c2a9..02113e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,11 +58,15 @@ jobs: - name: Push changes to main run: | - git fetch origin - git checkout -b main + git fetch origin main dev # Fetch only main and dev branches + git checkout main git config pull.rebase false - git pull origin main + git pull origin main # Get latest changes on main + + # Now merge dev into main, allowing unrelated histories if necessary git merge origin/dev --allow-unrelated-histories --no-ff + + # Push to main git push origin main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 45ee002fa02d6198a37f806d0216b606577535ed Mon Sep 17 00:00:00 2001 From: dconco Date: Tue, 24 Dec 2024 19:09:37 +0100 Subject: [PATCH 2/3] ss --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02113e5..12095ff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,6 +58,9 @@ 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 checkout main git config pull.rebase false From 0acaa4314b2355cb29f6b2ecc9fc7aaaa3a7af9f Mon Sep 17 00:00:00 2001 From: dconco Date: Tue, 24 Dec 2024 19:12:51 +0100 Subject: [PATCH 3/3] 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 }}