File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - main
77
88jobs :
9- merge -branches :
9+ sync -branches :
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Checkout code
13- uses : actions/checkout@v3
14-
15- - name : Check Main Branch Status
16- run : |
17- local_ref=$(git rev-parse main)
18- remote_ref=$(git rev-parse origin/main)
19- if [ "$local_ref" != "$remote_ref" ]; then
20- echo "HEAD is behind origin/main. Merging..."
21- git fetch origin/main
22- git merge origin/main -m "Actions workflow: auto-merge origin/main -> main"
23- fi
24-
25- - name : Handle Merge Conflicts
26- run : |
27- if [ -n "$(git status --short | grep 'U')" ]; then
28- echo "Merge conflicts found. Waiting for resolution..."
29- while [ -n "$(git status --short | grep 'U')" ]; do
30- sleep 5
31- done
32- fi
13+ uses : actions/checkout@v4
3314
3415 - name : Merge Main into Dev
3516 run : |
3617 git switch dev
37- git merge origin/ main -m "Actions workflow: auto-merge main -> dev"
38-
39- - name : Merge Main into Test
18+ git merge main
19+
20+ - name : Merge main into test
4021 run : |
4122 git switch test
42- git merge origin/ main -m "Actions workflow: auto-merge main -> test"
23+ git merge main
You can’t perform that action at this time.
0 commit comments