autoupdatefork.yml 705 B

1234567891011121314151617181920212223242526
  1. #更新fork
  2. name: update fork
  3. on:
  4. schedule:
  5. - cron: '0 16 * * *' #设置定时任务
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. if: ${{ github.event.repository.owner.id == github.event.sender.id && github.actor != 'gedoor' }}
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v3
  13. - name: Set env
  14. run: |
  15. git config --global user.email "github-actions@github.com"
  16. git config --global user.name "github-actions"
  17. - name: Update fork
  18. run: |
  19. git remote add upstream https://github.com/gedoor/legado.git
  20. git remote -v
  21. git fetch upstream
  22. git checkout master
  23. git merge upstream/master
  24. git push origin master