-
Notifications
You must be signed in to change notification settings - Fork 45
38 lines (34 loc) · 1.16 KB
/
pr-backporting.yml
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: Pull Request Backporting
on:
pull_request_target:
types: [closed, labeled]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
compute-targets:
if: ${{ github.event.pull_request.state == 'closed' && github.event.pull_request.merged }}
runs-on: ubuntu-latest
outputs:
target-branches: ${{ steps.set-targets.outputs.targets }}
env:
LABELS: ${{ toJSON(github.event.pull_request.labels) }}
steps:
- name: Set target branches
id: set-targets
uses: kiegroup/kie-ci/.ci/actions/parse-labels@main
with:
labels: ${LABELS}
backporting:
if: ${{ github.event.pull_request.state == 'closed' && github.event.pull_request.merged && needs.compute-targets.outputs.target-branches != '[]' }}
name: "[${{ matrix.target-branch }}] - Backporting"
runs-on: ubuntu-latest
needs: compute-targets
strategy:
matrix:
target-branch: ${{ fromJSON(needs.compute-targets.outputs.target-branches) }}
fail-fast: false
steps:
- name: Backporting
uses: kiegroup/kie-ci/.ci/actions/backporting@main
with:
target-branch: ${{ matrix.target-branch }}