Skip to content

Commit

Permalink
Flowzone: Allow external contributions
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Josh Bowling <[email protected]>
  • Loading branch information
joshbwlng committed Dec 6, 2022
1 parent 02090d3 commit bd74494
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ name: Flowzone
on:
pull_request:
types: [opened, synchronize, closed]
branches:
- "main"
- "master"
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
secrets:
FLOWZONE_TOKEN: ${{ secrets.FLOWZONE_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
BALENA_API_KEY: ${{ secrets.BALENA_API_KEY }}
# 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 bd74494

Please sign in to comment.