同步dev.yml 836 B

12345678910111213141516171819202122232425262728293031
  1. name: Merge upstream dev→dev
  2. on:
  3. # 推送代码后触发
  4. push:
  5. # 定时任务触发,使用 cron 规则,这里默认一小时执行一次
  6. schedule:
  7. - cron: '0 * * * *'
  8. workflow_dispatch:
  9. jobs:
  10. merge:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Merge upstream
  15. run: |
  16. # 使用自己的用户名替换 username
  17. git config --global user.name 'dlgt7'
  18. git config --global user.email 'dlgt7@gmail.com'
  19. git pull --unshallow
  20. # 自行替换要同步的上游仓库地址
  21. git remote add upstream https://github.com/FongMi/TV.git
  22. git fetch upstream
  23. git checkout --track origin/dev
  24. git merge upstream/dev
  25. git pull origin dev
  26. git push origin dev