Skip to content

Commit c7e8d22

Browse files
authored
Merge pull request #1383 from elezar/add-cherry-pick-automation
[no-relnote] Update cherrypick workflow from gpu-operator repo
2 parents b715dc8 + e09c971 commit c7e8d22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/cherrypick.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Cherry-Pick
1717
on:
1818
issue_comment:
1919
types: [created]
20-
pull_request:
20+
pull_request_target:
2121
types: [closed]
2222

2323
permissions:
@@ -59,15 +59,16 @@ jobs:
5959
runs-on: ubuntu-latest
6060
# Run when PR is merged and has cherry-pick labels
6161
if: |
62-
github.event_name == 'pull_request' &&
62+
github.event_name == 'pull_request_target' &&
6363
github.event.pull_request.merged == true &&
6464
contains(join(github.event.pull_request.labels.*.name, ','), 'cherry-pick/')
6565
6666
steps:
67-
- name: Checkout repository
68-
uses: actions/checkout@v5
67+
- name: Checkout base branch repository
68+
uses: actions/checkout@v4
6969
with:
7070
fetch-depth: 0
71+
ref: ${{ github.event.pull_request.base.ref }}
7172
token: ${{ secrets.GITHUB_TOKEN }}
7273

7374
- name: Extract target branches from PR labels

0 commit comments

Comments
 (0)