backport.yml 954 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Backport
  2. on:
  3. pull_request_target:
  4. types: [closed, labeled]
  5. issue_comment:
  6. types: [created]
  7. jobs:
  8. backport:
  9. permissions:
  10. contents: write
  11. pull-requests: write
  12. name: Backport Pull Request
  13. if: >
  14. github.repository_owner == 'neovim' && (
  15. github.event_name == 'pull_request_target' &&
  16. github.event.pull_request.merged
  17. ) || (
  18. github.event_name == 'issue_comment' &&
  19. github.event.issue.pull_request &&
  20. contains(github.event.comment.body, '/backport')
  21. )
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. with:
  26. # required to find all branches
  27. fetch-depth: 0
  28. ref: ${{ github.event.pull_request.head.sha }}
  29. - name: Create backport PRs
  30. uses: zeebe-io/backport-action@v0.0.7
  31. with:
  32. github_token: ${{ secrets.GITHUB_TOKEN }}
  33. github_workspace: ${{ github.workspace }}