Skip to content

Commit f5d64b3

Browse files
committed
ci: add autobackport workflow
This adds an autobackport workflow that will automatically backport pull request with backport-to-$branch label. Backport pull request is created upon mergin the original pull request for each requested branch. It is also possible to create additional backport by labeling the already merged pull request. If there are any conflicts during cherry-picks, they are commited and pull request is still opened. The author of the original pull request can then fix them and push to the backport pull request (guide is presented in the PR description). Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Jakub Vávra <jvavra@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com>
1 parent f1c6e97 commit f5d64b3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/backport.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
jobs:
8+
backport:
9+
name: Backport
10+
runs-on: ubuntu-latest
11+
if: >
12+
github.event.pull_request.merged
13+
&& (
14+
github.event.action == 'closed'
15+
|| (
16+
github.event.action == 'labeled'
17+
&& startsWith(github.event.label.name, 'backport-to-')
18+
)
19+
)
20+
steps:
21+
- uses: next-actions/backport@master
22+
with:
23+
user: sssd-bot
24+
token: ${{ secrets.BOT_TOKEN }}

0 commit comments

Comments
 (0)