File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,28 @@ jobs:
1010 runs-on : ubuntu-latest
1111
1212 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-b.1
19- git checkout -b dev-6.2.0-b.1 origin/dev-6.2.0-b.1
13+ - name : Checkout main branch
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ submodules : true
2018
2119 - name : Configure Git
2220 run : |
2321 git config --global user.name "github-actions[bot]"
2422 git config --global user.email "github-actions[bot]@users.noreply.github.com"
2523
24+ - name : Ensure dev branch exists
25+ run : |
26+ if git ls-remote --exit-code --heads origin dev-6.2.0-b.1; then
27+ echo "Branch exists on remote"
28+ git fetch origin dev-6.2.0-b.1
29+ git checkout dev-6.2.0-b.1
30+ else
31+ echo "Branch does not exist, creating it"
32+ git checkout -b dev-6.2.0-b.1
33+ fi
34+
2635 - name : Force replace dev branch with main branch contents (including submodules)
2736 run : |
2837 set -e
You can’t perform that action at this time.
0 commit comments