Skip to content

Commit cfa05d3

Browse files
authored
Actions: Run CI only for PRs from forks. (#489)
1 parent 8e35861 commit cfa05d3

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/black.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: ["push", "pull_request"]
44

55
jobs:
66
black:
7+
# We want to run on external PRs, but not on our own internal PRs as they'll be run
8+
# by the push to the branch.
9+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
10+
711
runs-on: ubuntu-latest
812
steps:
913
- name: Setup Python

.github/workflows/linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
jobs:
88
build:
9+
# We want to run on external PRs, but not on our own internal PRs as they'll be run
10+
# by the push to the branch.
11+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
12+
913
runs-on: ubuntu-latest
1014
steps:
1115
- name: Checkout

.github/workflows/windows.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Build and test windows wheels
22
on:
33
push:
4-
branches:
5-
- master
6-
- test
74
pull_request:
85
create:
96

107
jobs:
118
build:
9+
# We want to run on external PRs, but not on our own internal PRs as they'll be run
10+
# by the push to the branch.
11+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
12+
1213
runs-on: windows-latest
1314
steps:
1415
- name: Checkout

0 commit comments

Comments
 (0)