File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright lowRISC contributors.
2
+ # Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ name : Cherry-pick Pull Request
6
+ on :
7
+ pull_request_target :
8
+ types : [closed, labeled]
9
+
10
+ permissions :
11
+ contents : read
12
+
13
+ jobs :
14
+ cherrypick :
15
+ # NOTE: We currently need these permissions because we create pull request with the repo-scoped
16
+ # default token. We should in the future move to a PAT owned by lowrisc-bot and create pull request
17
+ # on its behalf.
18
+ permissions :
19
+ # Needed for the action to create branch.
20
+ contents : write
21
+ # Needed for the action to create a pull request.
22
+ pull-requests : write
23
+
24
+ name : Cherry-pick Pull Request
25
+ if : github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('CherryPick:', github.event.label.name))
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ with :
30
+ ref : ${{ github.event.pull_request.head.sha }}
31
+
32
+ - name : Create backport PRs
33
+ uses : korthout/backport-action@e8161d6a0dbfa2651b7daa76cbb75bc7c925bbf3 # v2.4.1
34
+ with :
35
+ label_pattern : " ^CherryPick:([^ ]+)$"
36
+ pull_title : " Cherry-pick to ${target_branch}: ${pull_title}"
37
+ pull_description : |
38
+ This is an automatic cherry-pick of #${pull_number} to branch `${target_branch}`.
You can’t perform that action at this time.
0 commit comments