Skip to content

Commit

Permalink
[BXMSPROD-2012] backport pr-backporting workflow to legacy branch (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
lampajr authored May 5, 2023
1 parent a4fec90 commit 3d8ec6e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr-backporting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}

0 comments on commit 3d8ec6e

Please sign in to comment.