File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Merge main to dev branch (with submodules)
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ merge :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Manually clone the repository
14+ run : |
15+ git init
16+ git remote add origin https://github.com/${{ github.repository }}.git
17+ git fetch origin main
18+ git fetch origin dev-6.2.0
19+ git checkout -b dev-6.2.0 origin/dev-6.2.0
20+
21+ - name : Configure Git
22+ run : |
23+ git config --global user.name "github-actions[bot]"
24+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
25+
26+ - name : Force replace dev branch with main branch contents (including submodules)
27+ run : |
28+ set -e
29+ git reset --hard origin/main
30+ git submodule update --init --recursive
31+ git add .
32+ git commit -m "Force sync dev branch with main branch (including submodules)" || echo "No changes to commit"
33+
34+ - name : Push changes to dev
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+ run : |
38+ git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git dev-6.2.0 --force
You can’t perform that action at this time.
0 commit comments