Skip to content

Commit a00dcb5

Browse files
author
微信公众号少年歌行PRO
authored
Create chavyleung.yml
1 parent ede06b4 commit a00dcb5

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/chavyleung.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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 }}

0 commit comments

Comments
 (0)