Skip to content

Commit

Permalink
Refactor GitHub Actions workflow to streamline main branch updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dconco committed Dec 24, 2024
1 parent 45ee002 commit 0acaa43
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,11 @@ jobs:

- name: Push changes to main
run: |
git config --global user.email "[email protected]"
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 }}

0 comments on commit 0acaa43

Please sign in to comment.