Skip to content

[FIXED][DEV1.1.0][OWNER] #5

[FIXED][DEV1.1.0][OWNER]

[FIXED][DEV1.1.0][OWNER] #5

Workflow file for this run

name: Merge Main into All Branches
on:
push:
branch:
- main
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get branch names
id: branches
run: |
git ls-remote --heads origin | awk -F'/' '{print $3}' | grep -vE 'main$' > ${{ github.workspace }}/branches.txt
- name: Merge main into branches
run: |
while read -r branch; do
git config --global user.email "73410627+JohnKun136NVCP@users.noreply.github.com"
git config --global user.name "JohnKun136NVCP"
git checkout "$branch"
git pull
git merge --no-ff main -m "Auto-merge main into $branch"
git push origin $branch
done < ${{ github.workspace }}/branches.txt