dailycheckin/.github/workflows/repo-sync.yml
2020-12-23 13:07:29 +08:00

29 lines
816 B
YAML

# File: .github/workflows/repo-sync.yml
name: 同步仓库
on:
schedule:
- cron: '5 0,7,15 * * *'
workflow_dispatch:
watch:
types: started
repository_dispatch:
types: 同步仓库
jobs:
repo-sync:
env:
PAT: ${{ secrets.PAT || github.event.client_payload.PAT }}
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: 【同步 sitoi/dailycheckin】
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/Sitoi/dailycheckin.git"
source_branch: "main"
destination_branch: "main"
github_token: ${{ secrets.PAT || github.event.client_payload.PAT }}