forked from YongFaGitHub/JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (29 loc) · 938 Bytes
/
sync-repo.yml
File metadata and controls
30 lines (29 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File: .github/workflows/repo-sync.yml
name: sync-ziye12-JavaScript
on:
schedule:
- cron: '1 */3 * * *'
workflow_dispatch:
watch:
types: started
repository_dispatch:
types: sync-ziye12-JavaScript
jobs:
repo-sync:
env:
PAT: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} # 我自己同步到gitee使用,其他人可忽略
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: sync ziye12-JavaScript
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/ziye12/JavaScript.git"
source_branch: "master"
destination_branch: "master"
github_token: ${{ secrets.PAT }}