LotteryAutoScript/.github/workflows/sync.yml
2021-02-24 16:53:09 +08:00

27 lines
766 B
YAML

name: 'Automatic sync'
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
watch:
types: started
repository_dispatch:
types: repo-sync
jobs:
repo-sync:
env:
PAT: ${{ github.event.client_payload.PAT || secrets.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: 开始自动同步
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/shanmite/LotteryAutoScript.git"
source_branch: "main"
destination_branch: "main"
github_token: ${{ github.event.client_payload.PAT || secrets.PAT }}