Allow moderated secrets usage on PRs from forks #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Receive pull request | |
on: | |
pull_request: | |
branches: [ main ] | |
env: | |
label: "safe to test" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Ensure first-party branch or valid label | |
if: > | |
! contains(github.event.pull_request.labels.*.name, env.label) | |
run: | | |
echo "Will not run \`pytest\` workflow for branch in fork without label \`${{ env.label }}\`." >>$GITHUB_STEP_SUMMARY | |
exit 1 |