Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Prevent backport workflow from running on umerged PRs (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#2746)

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
  • Loading branch information
AMoo-Miki authored and sikhote committed Apr 24, 2023
1 parent 3a01b9b commit c26cdf8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ jobs:
contents: write
pull-requests: write
name: Backport
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: GitHub App token
id: github_app_token
Expand Down

0 comments on commit c26cdf8

Please sign in to comment.