-
Notifications
You must be signed in to change notification settings - Fork 405
36 lines (35 loc) · 995 Bytes
/
back-port.yaml
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
name: Backport
on:
pull_request_target:
types:
- closed
issue_comment:
types:
- created
jobs:
# align with kubevela's choice https://github.com/oam-dev/kubevela/blob/master/.github/workflows/back-port.yaml
build:
name: Create backport PRs
runs-on: ubuntu-22.04
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/backport')
)
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Backport PR
uses: zeebe-io/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}