From 6d187d47e9a54f2934b1824f1357d72a5318071d Mon Sep 17 00:00:00 2001 From: Ethan White Date: Sat, 20 Jul 2024 14:43:29 -0400 Subject: [PATCH] Warn contributors about PRs from forks in tests [no version bump] 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. --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a03c7242..12676c2a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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