File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : sync-code
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - ' coding-test/**'
8
+ - ' pipeline/**'
9
+ tags : v*
10
+
11
+ jobs :
12
+ sync :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : clone
17
+ run : |
18
+ if [ -d packer-plugin-tencentcloud ]; then
19
+ rm -rf packer-plugin-tencentcloud
20
+ fi
21
+ git clone https://github.com/tencentcloudstack/packer-plugin-tencentcloud.git
22
+ - name : sync
23
+ run : |
24
+ cd packer-plugin-tencentcloud
25
+ git fetch --all
26
+ git branch -r --list "origin/coding-test/*" | grep -v HEAD | grep -v master | xargs -I {} git checkout -t {}
27
+ git branch -r --list "origin/pipeline/*" | grep -v HEAD | grep -v master | xargs -I {} git checkout -t {}
28
+ git remote add tgit_origin https://${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}@git.code.tencent.com/tencentcloudstack/packer-plugin-tencentcloud.git
29
+ git push -u tgit_origin -f --all
30
+ git push -u tgit_origin main:main
31
+ git push -u tgit_origin --tags
You can’t perform that action at this time.
0 commit comments