diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml index 8fef17d..4bf84a3 100644 --- a/.github/workflows/auto_cherry_pick.yml +++ b/.github/workflows/auto_cherry_pick.yml @@ -6,8 +6,14 @@ on: base_branch: description: "Base branch to create the PR against" required: true - default: "main" - + default: "main" + mode: + description: "Run mode: cherry-pick or verify" + required: false + default: "cherry-pick" + pull_request: + types: [labeled, opened, synchronize] + permissions: contents: write pull-requests: write @@ -16,8 +22,10 @@ permissions: jobs: cherry-pick: + if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required') uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1 with: original-owner: "Decathlon" repo-name: "release-notes-generator-action" base_branch: ${{ inputs.base_branch }} + mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode }}