diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/backport.yaml | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index a39e7e58..43245301 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml | |||
@@ -1,23 +1,38 @@ | |||
1 | name: Backport | 1 | name: Backport labeled merged pull requests |
2 | on: | 2 | on: |
3 | pull_request_target: | 3 | pull_request: |
4 | types: [closed, labeled] | 4 | types: [closed] |
5 | issue_comment: | ||
6 | types: [created] | ||
5 | jobs: | 7 | jobs: |
6 | backport: | 8 | build: |
7 | name: Backport Pull Request | 9 | name: Create backport PRs |
8 | if: github.repository_owner == 'Freescale' && github.event.pull_request.merged == true | ||
9 | runs-on: ubuntu-latest | 10 | runs-on: ubuntu-latest |
11 | # Only run when pull request is merged | ||
12 | # or when a comment containing `/backport` is created | ||
13 | if: > | ||
14 | ( | ||
15 | github.event_name == 'pull_request' && | ||
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 | ) | ||
10 | steps: | 22 | steps: |
11 | - uses: actions/checkout@v2 | 23 | - uses: actions/checkout@v2 |
12 | with: | 24 | with: |
13 | # required to find all branches | 25 | # Required to find all branches |
14 | fetch-depth: 0 | 26 | fetch-depth: 0 |
15 | ref: ${{ github.event.pull_request.head.sha }} | ||
16 | - name: Create backport PRs | 27 | - name: Create backport PRs |
17 | # should be kept in sync with `version` | 28 | # Should be kept in sync with `version` |
18 | uses: zeebe-io/backport-action@9b8949dcd4295d364b0939f07d0c7593598d26cd | 29 | uses: zeebe-io/backport-action@v0.0.4 |
19 | with: | 30 | with: |
31 | # Required | ||
32 | # Version of the backport-action | ||
33 | # Must equal the version in `uses` | ||
34 | # Recommended: latest tag or `master` | ||
35 | version: v0.0.4 | ||
36 | |||
20 | github_token: ${{ secrets.GITHUB_TOKEN }} | 37 | github_token: ${{ secrets.GITHUB_TOKEN }} |
21 | github_workspace: ${{ github.workspace }} | 38 | github_workspace: ${{ github.workspace }} |
22 | # should be kept in sync with `uses` | ||
23 | version: 9b8949dcd4295d364b0939f07d0c7593598d26cd | ||