auto-merge.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Auto Merge Base to Other Branches
  2. on:
  3. push:
  4. branches:
  5. - base
  6. workflow_dispatch: # 手动触发
  7. jobs:
  8. auto-merge:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout repository
  12. uses: actions/checkout@v3
  13. with:
  14. fetch-depth: 0
  15. token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
  16. - name: Merge base into main
  17. run: |
  18. git config user.name "GitHub Actions"
  19. git config user.email "actions@github.com"
  20. git checkout main
  21. git merge base --no-ff -m "Auto merge base into main"
  22. git push origin main
  23. - name: Merge base into i18n
  24. run: |
  25. git config user.name "GitHub Actions"
  26. git config user.email "actions@github.com"
  27. git checkout i18n
  28. git merge base --no-ff -m "Auto merge base into i18n"
  29. git push origin i18n
  30. - name: Merge base into tabbar
  31. run: |
  32. git config user.name "GitHub Actions"
  33. git config user.email "actions@github.com"
  34. git checkout tabbar
  35. git merge base --no-ff -m "Auto merge base into tabbar"
  36. git push origin tabbar