We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e650e7d commit 2a59316Copy full SHA for 2a59316
.github/workflows/sync-repo.yml
@@ -0,0 +1,27 @@
1
+name: 同步上游仓库
2
+on:
3
+ schedule:
4
+ - cron: '0 */2 * * *'
5
+ watch:
6
+ types: started
7
+ repository_dispatch:
8
+ types: sync-repo
9
+jobs:
10
+ repo-sync:
11
+ env:
12
+ PAT: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11
13
+ runs-on: ubuntu-latest
14
+ if: github.event.repository.owner.id == github.event.sender.id
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ with:
18
+ persist-credentials: false
19
+
20
+ - name: sync ziye12-JavaScript
21
+ uses: repo-sync/github-sync@v2
22
+ if: env.PAT
23
24
+ source_repo: "https://github.com/ziye12/JavaScript.git"
25
+ source_branch: "master"
26
+ destination_branch: "main"
27
+ github_token: ${{ secrets.PAT }}
0 commit comments