Skip to content

Commit 871a096

Browse files
ci: Update auto_cherry_pick.yml
1 parent 51f9a49 commit 871a096

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/auto_cherry_pick.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ on:
1212
required: false
1313
type: string
1414
default: "npm run all"
15+
mode:
16+
description: 'Run mode: cherry-pick or verify'
17+
required: false
18+
default: 'cherry-pick'
19+
20+
pull_request:
21+
types: [opened, synchronize, labeled]
1522

1623
permissions:
1724
contents: write
@@ -21,9 +28,12 @@ permissions:
2128

2229
jobs:
2330
cherry-pick:
31+
if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required')
2432
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1
2533
with:
2634
original-owner: "lasith-kg"
2735
repo-name: "dispatch-workflow"
2836
base_branch: ${{ inputs.base_branch }}
2937
script: ${{ inputs.script || 'npm run all' }}
38+
mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode }}
39+

0 commit comments

Comments
 (0)