mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
CI: Don't run duplicate jobs for same-repo pull requests
Pushes to branches in this repo already run CI, so run pull_request jobs only for PRs from forks, which don't trigger push runs here. The push run's checks still appear on the PR, since checks are attached to the head commit. (This skips merge-commit testing for same-repo PRs -- the push run tests the branch as-is.)
This commit is contained in:
parent
4c392c4764
commit
62a431f42b
1 changed files with 7 additions and 0 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -7,6 +7,10 @@ jobs:
|
|||
test:
|
||||
name: Test (shard ${{ matrix.shard }})
|
||||
runs-on: ubuntu-latest
|
||||
# Same-repo PRs are covered by the push run, so run pull_request jobs only for forks
|
||||
if: >
|
||||
github.event_name != 'pull_request'
|
||||
|| github.event.pull_request.head.repo.full_name != github.repository
|
||||
strategy:
|
||||
matrix:
|
||||
shard: [1, 2, 3, 4]
|
||||
|
|
@ -83,6 +87,9 @@ jobs:
|
|||
utilities:
|
||||
name: Utilities Tests
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event_name != 'pull_request'
|
||||
|| github.event.pull_request.head.repo.full_name != github.repository
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue