summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorVinicius Aquino <vinicius.aquino@ossystems.com.br>2021-06-17 18:22:05 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2021-06-18 10:18:41 -0300
commit236f889c7fa0fd46c965a46092b8b5d84d5fcc93 (patch)
tree64fc567f9904550c6592d8d0dcf4277ae6900358 /.github
parentc8b0f7058be199354f5eb90f0d227f1e307baacf (diff)
downloadmeta-freescale-236f889c7fa0fd46c965a46092b8b5d84d5fcc93.tar.gz
cicd: backport: update workflow based on new 0.0.4
The new release allow the use of pull request comments to trigger the backport process. Signed-off-by: Vinicius Aquino <vinicius.aquino@ossystems.com.br>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/backport.yaml39
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 @@
1name: Backport 1name: Backport labeled merged pull requests
2on: 2on:
3 pull_request_target: 3 pull_request:
4 types: [closed, labeled] 4 types: [closed]
5 issue_comment:
6 types: [created]
5jobs: 7jobs:
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