From c3b2150272fe9a54ae4f41ee733c3272318ca7df Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Wed, 15 Mar 2023 11:19:49 -0400 Subject: [PATCH] flowzone: Prevent duplicate workflow executions Changelog-entry: Prevent duplicate CI workflow executions Signed-off-by: Kyle Harding --- .github/workflows/flowzone.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index e33c954..d426f3b 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -18,4 +18,13 @@ jobs: flowzone: name: Flowzone uses: product-os/flowzone/.github/workflows/flowzone.yml@master + # prevent duplicate workflow executions for pull_request and pull_request_target + if: | + ( + github.event.pull_request.head.repo.full_name == github.repository && + github.event_name == 'pull_request' + ) || ( + github.event.pull_request.head.repo.full_name != github.repository && + github.event_name == 'pull_request_target' + ) secrets: inherit