diff --git a/.github/workflows/sync-code.yml b/.github/workflows/sync-code.yml index 8f24a93c03..1f46b49652 100644 --- a/.github/workflows/sync-code.yml +++ b/.github/workflows/sync-code.yml @@ -25,7 +25,9 @@ jobs: run: | cd terraform-provider-tencentcloud git fetch --all + git branch -r --list "origin/coding-test/*" | grep -v HEAD | grep -v master | xargs -I {} git checkout -t {} + git branch -r --list "origin/pipeline/*" | grep -v HEAD | grep -v master | xargs -I {} git checkout -t {} git remote add tgit_origin https://${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}@git.code.tencent.com/tencentcloudstack/terraform-provider-tencentcloud.git - for remote in `git branch -r | grep -v "\->" | grep -v "master"`; do git branch --track ${remote#origin/} $remote; done - git push -f --tags tgit_origin master:main - git push -f --all tgit_origin + git push -u tgit_origin --all + git push -u tgit_origin master:main + git push -u tgit_origin --tags \ No newline at end of file