Skip to content

Commit ab35ce4

Browse files
authored
Don't run scheduled workflow jobs on forks (#2490)
1 parent f355ddb commit ab35ce4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212
jobs:
1313
test:
1414
name: test ${{ matrix.py }} - ${{ matrix.os }}
15+
if: github.event_name != 'schedule' || github.repository_owner == 'pypa'
1516
runs-on: ${{ matrix.os }}
1617
strategy:
1718
fail-fast: false
@@ -137,6 +138,7 @@ jobs:
137138

138139
check:
139140
name: ${{ matrix.tox_env }} - ${{ matrix.os }}
141+
if: github.event_name != 'schedule' || github.repository_owner == 'pypa'
140142
runs-on: ${{ matrix.os }}
141143
strategy:
142144
fail-fast: false
@@ -169,7 +171,6 @@ jobs:
169171
UPGRADE_ADVISORY: "yes"
170172

171173
publish:
172-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
173174
needs: [check, coverage]
174175
runs-on: ubuntu-22.04
175176
steps:
@@ -185,6 +186,7 @@ jobs:
185186
- name: Build sdist and wheel
186187
run: python -m build -s -w . -o dist
187188
- name: Publish to PyPi
189+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository_owner == 'pypa'
188190
uses: pypa/[email protected]
189191
with:
190192
skip_existing: true

0 commit comments

Comments
 (0)