Skip to content

Commit 2a59316

Browse files
author
ziye12
authored
Add files via upload
1 parent e650e7d commit 2a59316

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/sync-repo.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
with:
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

Comments
 (0)