Skip to content

Commit e994a4f

Browse files
authored
Merge pull request #1205 from yql70/main
🎨update sync
2 parents c6ca285 + 07fa72e commit e994a4f

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/sync.yml

+13-14
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,33 @@ jobs:
1616
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
1717
git fetch --all
1818
for branch in `git branch -a | grep remotes | grep -v HEAD`; do
19-
git branch --track ${branch##*/} $branch
19+
git branch --track ${branch#remotes/origin/}} $branch
2020
done
2121
env:
2222
GITHUB_REPOSITORY: Tencent/CodeAnalysis
2323

2424
- name: Push to TGIT
2525
run: |
2626
remote_repo="https://${TGIT_USERNAME}:${TGIT_PASSWORD}@git.code.tencent.com/${TGIT_REPOSITORY}.git"
27-
git remote add tencent "${remote_repo}"
27+
git remote add tgit "${remote_repo}"
2828
git show-ref
2929
git branch --verbose
30-
git push --all --force tencent
31-
git push --tags --force tencent
30+
git push --all --force tgit
31+
git push --tags --force tgit
3232
env:
3333
TGIT_REPOSITORY: Tencent_Open_Source/CodeAnalysis
3434
TGIT_USERNAME: ${{ secrets.USERNAME }}
3535
TGIT_PASSWORD: ${{ secrets.PASSWORD }}
36+
continue-on-error: true
3637

37-
- name: Push to Gitee
38+
- name: Push to CNB
3839
run: |
39-
remote_repo="https://${GITEE_USERNAME}:${GITEE_PASSWORD}@gitee.com/${GITEE_REPOSITORY}.git"
40-
git remote add gitee "${remote_repo}"
41-
git show-ref
42-
git branch --verbose
43-
git push --all --force gitee
44-
git push --tags --force gitee
40+
remote_repo="https://${CNB_USERNAME}:${CNB_PASSWORD}@cnb.cool/${CNB_REPOSITORY}.git"
41+
git remote add cnb "${remote_repo}"
42+
git push --all --force cnb
43+
git push --tags --force cnb
4544
env:
46-
GITEE_REPOSITORY: zhang9w0v5/CodeAnalysis
47-
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }}
48-
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }}
45+
CNB_REPOSITORY: tca/code-analysis
46+
CNB_USERNAME: ${{ secrets.CNB_USERNAME }}
47+
CNB_PASSWORD: ${{ secrets.CNB_PASSWORD }}
4948

0 commit comments

Comments
 (0)