-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor GitHub Actions workflow to streamline main branch updates
- Loading branch information
Showing
1 changed file
with
2 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |