Skip to content

Instantly share code, notes, and snippets.

@gcdd1993
Created November 2, 2021 06:28
Show Gist options
  • Save gcdd1993/2d1785e8b6d833d5ae17d92ead2d0ecf to your computer and use it in GitHub Desktop.
Save gcdd1993/2d1785e8b6d833d5ae17d92ead2d0ecf to your computer and use it in GitHub Desktop.
Sync Repo with Github Action
name: Sync yml repo
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
jobs:
sync-JDMemberCloseAccount:
env:
PAT: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11,需要repo和workflow权限
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 JDMemberCloseAccount
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/yqchilde/JDMemberCloseAccount"
source_branch: "main"
destination_branch: "main"
github_token: ${{ secrets.PAT }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment