Skip to content

Commit 2c0c6a1

Browse files
committed
Add workflow to auto cherry-pick PR to release branch release-1.0
Cherry-pick will be triggered once branch is merged and it's labelled cherry-pick-release-1.0. Signed-off-by: Anil Vishnoi <[email protected]>
1 parent a1394b7 commit 2c0c6a1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/cherry-pick.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
types: ["closed"]
6+
7+
jobs:
8+
cherry_pick_release_1_0:
9+
runs-on: ubuntu-latest
10+
name: Cherry pick into release-1.0 branch
11+
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-release-1.0') && github.event.pull_request.merged == true }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Cherry pick into release-1.0 branch
18+
uses: carloscastrojumo/[email protected]
19+
with:
20+
branch: release-1.0
21+
labels: |
22+
cherry-pick
23+
reviewers: |
24+
aReviewerUser
25+
title: '[cherry-pick] {old_title}'
26+
body: 'Cherry picking #{old_pull_request_id} onto this branch'
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)