Skip to content
Closed
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
26 changes: 26 additions & 0 deletions .github/workflows/backport-active.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Backport to active branches

on:
pull_request_target:
types: [closed, labeled]
branches:
- main

permissions:
pull-requests: write
contents: read

jobs:
backport:
# Only run if the PR was merged (not just closed) and has one of the backport labels
# or has been added afterwards.
if: |
github.event.pull_request.merged == true &&
(
(github.event.action == 'closed' && contains(toJSON(github.event.pull_request.labels.*.name), 'backport-active-')) ||
(github.event.action == 'labeled' && startsWith(github.event.label.name, 'backport-active-'))
)
runs-on: ubuntu-latest

steps:
- uses: elastic/oblt-actions/github/backport-active@v1