sync-main-on-release.yml 592 B

1234567891011121314151617181920212223242526
  1. name: Sync branch
  2. on:
  3. release:
  4. types: [published]
  5. branches: [dev]
  6. jobs:
  7. force-push-main:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout repository
  11. uses: actions/checkout@v4
  12. with:
  13. fetch-depth: 0
  14. - name: Configure Git
  15. run: |
  16. git config --global user.name "github-actions[bot]"
  17. git config --global user.email "github-actions[bot]@users.noreply.github.com"
  18. - name: Force push dev to main
  19. run: |
  20. git fetch origin
  21. git checkout dev
  22. git push origin dev:main --force