repo-sync.yml 682 B

1234567891011121314151617181920212223
  1. name: repo-sync
  2. on:
  3. # 每天 00:05 自动同步
  4. schedule:
  5. - cron: '5 0 * * *'
  6. # 手动触发部署
  7. workflow_dispatch:
  8. jobs:
  9. sync-to-gitee:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Sync to Gitee
  13. uses: wearerequired/git-mirror-action@master
  14. env:
  15. # 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
  16. SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
  17. with:
  18. # 注意替换为你的 GitHub 源仓库地址
  19. source-repo: git@github.com:fantastic-admin/basic.git
  20. # 注意替换为你的 Gitee 目标仓库地址
  21. destination-repo: git@gitee.com:fantastic-admin/basic.git