Skip to content

Commit

Permalink
Warn contributors about PRs from forks in tests [no version bump]
Browse files Browse the repository at this point in the history
Due to the use of secrets in tests will not pass if submitted via PRs from forks.
These failures can be quite confusing.
To reduce confusion this adds up step to the GH actions workflow that will fail informatively if running on a PR from a fork.
  • Loading branch information
ethanwhite committed Jul 20, 2024
1 parent c75d213 commit 9afeeb3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Tests will fail on PRs from forks
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
echo Tests require pull requests be submitted from branches in the main repository
exit 1
- uses: actions/checkout@v4
with:
fetch-depth: 3
Expand Down

0 comments on commit 9afeeb3

Please sign in to comment.