8000 CI: Skip jobs on forks · matplotlib/matplotlib@48a9d7c · GitHub
[go: up one dir, main page]

Skip to content

Commit 48a9d7c

Browse files
committed
CI: Skip jobs on forks
1 parent 4f26d9a commit 48a9d7c

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ permissions:
2424
jobs:
2525
build_sdist:
2626
if: >-
27-
github.event_name == 'push' ||
28-
github.event_name == 'pull_request' && (
29-
(
30-
github.event.action == 'labeled' &&
31-
github.event.label.name == 'CI: Run cibuildwheel'
32-
) ||
33-
contains(github.event.pull_request.labels.*.name,
34-
'CI: Run cibuildwheel')
27+
github.repository == 'matplotlib/matplotlib' && (
28+
github.event_name == 'push' ||
29+
github.event_name == 'pull_request' && (
30+
(
31+
github.event.action == 'labeled' &&
32+
github.event.label.name == 'CI: Run cibuildwheel'
33+
) ||
34+
contains(github.event.pull_request.labels.*.name,
35+
'CI: Run cibuildwheel')
36+
)
3537
)
3638
name: Build sdist
3739
runs-on: ubuntu-latest
@@ -78,14 +80,16 @@ jobs:
7880

7981
build_wheels:
8082
if: >-
81-
github.event_name == 'push' ||
82-
github.event_name == 'pull_request' && (
83-
(
84-
github.event.action == 'labeled' &&
85-
github.event.label.name == 'CI: Run cibuildwheel'
86-
) ||
87-
contains(github.event.pull_request.labels.*.name,
88-
'CI: Run cibuildwheel')
83+
github.repository == 'matplotlib/matplotlib' && (
84+
github.event_name == 'push' ||
85+
github.event_name == 'pull_request' && (
86+
(
87+
github.event.action == 'labeled' &&
88+
github.event.label.name == 'CI: Run cibuildwheel'
89+
) ||
90+
contains(github.event.pull_request.labels.*.name,
91+
'CI: Run cibuildwheel')
92+
)
8993
)
9094
needs: build_sdist
9195
name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
@@ -183,7 +187,7 @@ jobs:
183187
if-no-files-found: error
184188

185189
publish:
186-
if: github.event_name == 'push' && github.ref_type == 'tag'
190+
if: github.repository == 'matplotlib/matplotlib' && github.event_name == 'push' && github.ref_type == 'tag'
187191
name: Upload release to PyPI
188192
needs: [build_sdist, build_wheels]
189193
runs-on: ubuntu-latest

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
jobs:
1414
analyze:
15+
if: github.repository == 'matplotlib/matplotlib'
1516
name: Analyze
1617
runs-on: ubuntu-latest
1718
permissions:

.github/workflows/conflictcheck.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
jobs:
1313
main:
14+
if: github.repository == 'matplotlib/matplotlib'
1415
runs-on: ubuntu-latest
1516
permissions:
1617
pull-requests: write

0 commit comments

Comments
 (0)
0