auto-merge.yml 643 B

123456789101112131415161718192021222324252627
  1. name: Auto Merge Main to Other Branches
  2. on:
  3. push:
  4. branches:
  5. - main
  6. workflow_dispatch: # 手动触发
  7. jobs:
  8. merge-to-i18n:
  9. name: Merge main into i18n
  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 main into i18n
  18. run: |
  19. git config user.name "GitHub Actions"
  20. git config user.email "actions@github.com"
  21. git checkout i18n
  22. git merge main --no-ff -m "Auto merge main into i18n"
  23. git push origin i18n