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+ # # chavyleung 新仓库自动定时同步代码 ,教程公众号文章讲过了,不废话了,地址https://mp.weixin.qq.com/s/fcI4vQHD8TNajvTML9g3AA
2+
3+ # # 每隔3小时拉取一次作者脚本到自己仓库的分支。
4+
5+
6+
7+ name:chavyleung-sync
8+ on :
9+ schedule :
10+ - cron : ' 9 */3 * * *'
11+ workflow_dispatch :
12+ watch :
13+ types : started
14+ repository_dispatch :
15+ types : sync-chavyleung-scripts
16+ jobs :
17+ repo-sync :
18+ env :
19+ PAT : ${{ secrets.PAT }}
20+ runs-on : ubuntu-latest
21+ if : github.event.repository.owner.id == github.event.sender.id
22+ steps :
23+ - uses : actions/checkout@v2
24+ with :
25+ persist-credentials : false
26+
27+ - name : sync chavyleung-scripts
28+ uses : repo-sync/github-sync@v2
29+ if : env.PAT
30+ with :
31+ source_repo : " https://github.com/chavyleung/scripts.git"
32+ source_branch : " master"
33+ destination_branch : " chavyleung"
34+ github_token : ${{ secrets.PAT }}
You can’t perform that action at this time.
0 commit comments