Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backport GH action #389

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Automated Backporting

on:
pull_request_target:
types:
- closed
branches:
- main

jobs:
create_backport:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- if: contains(github.event.pull_request.labels.*.name, '13.x')
name: 13.x Backport
uses: kiegroup/[email protected]
with:
target-branch: 13.x
pull-request: ${{ github.event.pull_request.url }}
auth: ${{ secrets.GITHUB_TOKEN }}
no-squash: true

- if: contains(github.event.pull_request.labels.*.name, '14.x')
name: 14.x Backport
uses: kiegroup/[email protected]
with:
target-branch: 14.x
pull-request: ${{ github.event.pull_request.url }}
auth: ${{ secrets.GITHUB_TOKEN }}
no-squash: true
19 changes: 19 additions & 0 deletions .github/workflows/backport_reaper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Backport branch reaper

on:
pull_request_target:
types:
- closed
branches:
- '*.x'

jobs:
remove_backport_branch:
if: startsWith(github.event.pull_request.head.ref, 'bp-')
runs-on: ubuntu-latest
steps:
- name: Delete PR head branches
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
numbers: ${{github.event.pull_request.number}}
Loading