File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # File: .github/workflows/repo-sync.yml
2+ name : sync-ziye12-QCZJSPEED
3+ on :
4+ schedule :
5+ - cron : ' 1 */3 * * *'
6+ workflow_dispatch :
7+ watch :
8+ types : started
9+ repository_dispatch :
10+ types : sync-ziye12-QCZJSPEED
11+ jobs :
12+ repo-sync :
13+ env :
14+ PAT : ${{ secrets.PAT }} # 此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11
15+ dst_key : ${{ secrets.GITEE_PRIVATE_KEY }} # 我自己同步到gitee使用,其他人可忽略
16+ runs-on : ubuntu-latest
17+ if : github.event.repository.owner.id == github.event.sender.id
18+ steps :
19+ - uses : actions/checkout@v2
20+ with :
21+ persist-credentials : false
22+
23+ - name : sync ziye12-QCZJSPEED
24+ uses : repo-sync/github-sync@v2
25+ if : env.PAT
26+ with :
27+ source_repo : " https://github.com/ziye12/QCZJSPEED.git"
28+ source_branch : " main"
29+ destination_branch : " main"
30+ github_token : ${{ secrets.PAT }}
31+ # 我自己同步到gitee使用,其他人可忽略
32+ - name : sync github -> gitee
33+ uses : Yikun/hub-mirror-action@main
34+ if : env.dst_key
35+ with :
36+ # 必选,需要同步的Github用户(源)
37+ src : github/Sunert
38+ # 必选,需要同步到的Gitee的用户(目的)
39+ dst : gitee/Sunert
40+ # 必选,更新指定库名字
41+ static_list : " Scripts"
42+
43+ # 必选,Gitee公钥对应的私钥,https://gitee.com/profile/sshkeys
44+ dst_key : ${{ secrets.GITEE_PRIVATE_KEY }}
45+
46+ # 必选,Gitee对应的用于创建仓库的token,https://gitee.com/profile/personal_access_tokens
47+ dst_token : ${{ secrets.GITEE_TOKEN }}
You can’t perform that action at this time.
0 commit comments