git_sync.yaml 1000 B

1234567891011121314151617181920212223242526272829
  1. name: Sync to enterprise
  2. on:
  3. push:
  4. branches:
  5. - master
  6. jobs:
  7. sync_to_enterprise:
  8. runs-on: ubuntu-20.04
  9. if: github.repository == 'emqx/emqx'
  10. steps:
  11. - name: git-sync
  12. uses: Rory-Z/git-sync@v3.0.1
  13. with:
  14. source_repo: ${{ github.repository }}
  15. source_branch: ${{ github.ref }}
  16. destination_repo: "${{ github.repository_owner }}/emqx-enterprise"
  17. destination_branch: ${{ github.ref }}
  18. destination_ssh_private_key: "${{ secrets.CI_SSH_PRIVATE_KEY }}"
  19. - name: create pull request
  20. run: |
  21. set -euo pipefail
  22. curl --silent --show-error \
  23. -H "Accept: application/vnd.github.v3+json" \
  24. -H "Authorization: token ${{ secrets.CI_GIT_TOEKN }}" \
  25. -X POST \
  26. -d '{"title": "Sync code into enterprise from opensource", "head": "master", "base":"enterprise"}' \
  27. https://api.github.com/repos/${{ github.repository_owner }}/emqx-enterprise/pulls