forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 989 Bytes
/
backport-on-merge.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
# Invoke the backport bot whenever we merge into dev.
name: backport-on-merge
on:
push:
branches:
- dev
env:
SCRIPT_DIR: "${{ github.workspace }}/.github/workflows/scripts/backport-command"
PR_NUMBER: ${{ github.event.number }}
jobs:
backport-on-merge:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
# Find the PR associated with this push, if there is one.
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
# Can be "open", "closed", or "all". Defaults to "open".
state: closed
- run: echo "PR_NUMBER=${PR}" >>"$GITHUB_ENV"
if: success() && steps.findPr.outputs.number
env:
PR: ${{ steps.findPr.outputs.pr }}
- name: Backport On Merge
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }}
id: extract_required_backports_from_pr_body
run: $SCRIPT_DIR/backport_on_merge.sh
shell: bash