Skip to content

Commit

Permalink
Add gatekeeper.yml (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Nov 21, 2022
1 parent 4ea5f08 commit cd80df7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/gatekeeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: gatekeeper
# This workflow shares subset of secrets from the main repo for PRs from fork repos
# if the user has write access to the main repo

on:
pull_request_target:
types:
- opened
- synchronize
- ready_for_review

jobs:
run:
runs-on: ubuntu-latest
outputs:
pytest-sentry-dsn: ${{ steps.setter.outputs.pytest-sentry-dsn }}

steps:
- name: Check if user has write access
uses: lannonbr/repo-permission-check-action@2bb8c89ba8bf115c4bfab344d6a6f442b24c9a1f
with:
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Share secrets
id: setter
if: success()
run: |
echo "pytest-sentry-dsn=${{secrets.PYTEST_SENTRY_DSN}}" >> $GITHUB_OUTPUT

0 comments on commit cd80df7

Please sign in to comment.