Skip to content

Commit

Permalink
Flowzone: Allow external contributions
Browse files Browse the repository at this point in the history
Update the flowzone workflow to allow external PRs from forks

Change-type: patch
Signed-off-by: Florin Sarbu <florin@balena.io>
  • Loading branch information
floion committed Dec 16, 2022
1 parent a230aae commit bb2226c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ on:
branches:
- "main"
- "master"
# allow external contributions to use secrets within trusted code
pull_request_target:
types: [opened, synchronize, closed]
branches:
- "main"
- "master"

jobs:
flowzone:
name: Flowzone
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for
# internal or external contributions respectively
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

0 comments on commit bb2226c

Please sign in to comment.