mirror of
https://github.com/GXDE-OS/GXDE.git
synced 2026-06-22 05:16:36 +08:00
增加同步地址
This commit is contained in:
@@ -18,9 +18,11 @@ jobs:
|
||||
|
||||
- name: Push
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
||||
GITHUBUSER: ${{ secrets.GITHUBUSER }}
|
||||
GITCODETOKEN: ${{ secrets.GITCODETOKEN }}
|
||||
GITCODEUSER: ${{ secrets.GITCODEUSER }}
|
||||
run: |
|
||||
cd sync-gitee-to-github
|
||||
python3 sync.py $GITHUBUSER $TOKEN
|
||||
python3 sync.py $GITHUBUSER $GITHUBTOKEN $GITCODEUSER $GITCODETOKEN
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ dataHeaders = {
|
||||
}
|
||||
pullUrl = "https://gitee.com/GXDE-OS/"
|
||||
pushUrl = [
|
||||
"https://@USER@:@PASS@@github.com/GXDE-OS/"
|
||||
"https://@USER@:@PASS@@github.com/GXDE-OS/",
|
||||
"https://@USER@:@PASS@@gitcode.com/GXDE-OS/"
|
||||
]
|
||||
|
||||
if (len(sys.argv) < 1 + len(pushUrl) * 2):
|
||||
@@ -52,7 +53,7 @@ for i in repoList:
|
||||
# git remote set-url origin
|
||||
gitUrl = pushUrl[j].replace("@USER@", userName[j]).replace("@PASS@", password[j]) + "/" + i
|
||||
os.system(f"cd '{programPath}/git-clone/{i}' ; git remote set-url origin '{gitUrl}'")
|
||||
os.system(f"cd '{programPath}/git-clone/{i}' ; git push origin +'*'")
|
||||
os.system(f"cd '{programPath}/git-clone/{i}' ; git push --mirror -f")
|
||||
# 移除临时文件
|
||||
os.system(f"rm -rf '{programPath}/git-clone/{i}'")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user