mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 21:58:03 +08:00
30 lines
813 B
YAML
30 lines
813 B
YAML
# File: .github/workflows/repo-sync.yml
|
|
name: 同步仓库
|
|
on:
|
|
schedule:
|
|
- cron: '15 0 * * *'
|
|
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 }}
|