Skip to content

Commit b373fac

Browse files
ci(workflows): skip Unity tests for forked repository PRs
Add conditional check to skip Unity tests when running workflows from forked repositories, where secrets are not available. This allows external contributors to still get CI feedback on build and unit tests while gracefully handling missing Unity credentials. The workflow will run Unity tests for: - PRs from branches in the main repository - Any case where Unity secrets are available Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1c611c8 commit b373fac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
Library-
8585
8686
- name: Run Unity tests
87+
# Skip Unity tests for external PRs (secrets not available in forks)
88+
if: github.event.pull_request.head.repo.full_name == github.repository || secrets.UNITY_EMAIL != ''
8789
uses: game-ci/unity-test-runner@v4
8890
id: unity-tests
8991
env:

0 commit comments

Comments
 (0)