auto-merge.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: Auto Merge Base to Other Branches
  2. on:
  3. push:
  4. branches:
  5. - base
  6. workflow_dispatch: # 手动触发
  7. jobs:
  8. merge-to-main:
  9. name: Merge base into main
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout repository
  13. uses: actions/checkout@v4
  14. with:
  15. fetch-depth: 0
  16. token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
  17. - name: Merge base into main
  18. run: |
  19. git config user.name "GitHub Actions"
  20. git config user.email "actions@github.com"
  21. git checkout main
  22. git merge base --no-ff -m "Auto merge base into main"
  23. git push origin main
  24. merge-to-i18n:
  25. name: Merge base into i18n
  26. runs-on: ubuntu-latest
  27. steps:
  28. - name: Checkout repository
  29. uses: actions/checkout@v4
  30. with:
  31. fetch-depth: 0
  32. token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
  33. - name: Merge base into i18n
  34. run: |
  35. git config user.name "GitHub Actions"
  36. git config user.email "actions@github.com"
  37. git checkout i18n
  38. git merge base --no-ff -m "Auto merge base into i18n"
  39. git push origin i18n
  40. merge-to-tabbar:
  41. name: Merge base into tabbar
  42. runs-on: ubuntu-latest
  43. steps:
  44. - name: Checkout repository
  45. uses: actions/checkout@v4
  46. with:
  47. fetch-depth: 0
  48. token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
  49. - name: Merge base into tabbar
  50. run: |
  51. git config user.name "GitHub Actions"
  52. git config user.email "actions@github.com"
  53. git checkout tabbar
  54. git merge base --no-ff -m "Auto merge base into tabbar"
  55. git push origin tabbar
  56. merge-to-spa:
  57. name: Merge base into spa
  58. runs-on: ubuntu-latest
  59. steps:
  60. - name: Checkout repository
  61. uses: actions/checkout@v4
  62. with:
  63. fetch-depth: 0
  64. token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
  65. - name: Merge base into spa
  66. run: |
  67. git config user.name "GitHub Actions"
  68. git config user.email "actions@github.com"
  69. git checkout spa
  70. git merge base --no-ff -m "Auto merge base into spa"
  71. git push origin spa