summaryrefslogtreecommitdiffstats
path: root/.github/workflows/backport.yaml
blob: 432453011284cdd3f0f414d3152ac7b5f8ba8a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Backport labeled merged pull requests
on:
  pull_request:
    types: [closed]
  issue_comment:
    types: [created]
jobs:
  build:
    name: Create backport PRs
    runs-on: ubuntu-latest
    # Only run when pull request is merged
    # or when a comment containing `/backport` is created
    if: >
      (
        github.event_name == 'pull_request' &&
        github.event.pull_request.merged
      ) || (
        github.event_name == 'issue_comment' &&
        github.event.issue.pull_request &&
        contains(github.event.comment.body, '/backport')
      )
    steps:
      - uses: actions/checkout@v2
        with:
          # Required to find all branches
          fetch-depth: 0
      - name: Create backport PRs
        # Should be kept in sync with `version`
        uses: zeebe-io/backport-action@v0.0.4
        with:
          # Required
          # Version of the backport-action
          # Must equal the version in `uses`
          # Recommended: latest tag or `master`
          version: v0.0.4

          github_token: ${{ secrets.GITHUB_TOKEN }}
          github_workspace: ${{ github.workspace }}