JDHelloWorld-sync #2070
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JDHelloWorld-sync | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
# 格林威治时间 (GMT) 每日01时开始执行 | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
watch: | |
types: started | |
repository_dispatch: | |
types: sync-JDHelloWorld/jd_scripts | |
jobs: | |
repo-sync: | |
env: | |
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: sync JDHelloWorld/jd_scripts | |
uses: repo-sync/github-sync@v2 | |
if: env.PAT | |
with: | |
source_repo: "https://github.com/JDHelloWorld/jd_scripts.git" | |
source_branch: "main" | |
destination_branch: "JDHelloWorld" | |
github_token: ${{ secrets.PAT }} |