Skip to content

Commit 56a0420

Browse files
committed
only run publish workflows in the root repository
1 parent 8405412 commit 56a0420

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/wheels.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ jobs:
9797
path: ./wheelhouse/*.whl
9898

9999
build-2-native-wheels:
100+
if: github.event_name != 'schedule' || github.repository_owner == 'python-pillow'
100101
name: ${{ matrix.name }}
101102
runs-on: ${{ matrix.os }}
102103
strategy:
@@ -150,6 +151,7 @@ jobs:
150151
path: ./wheelhouse/*.whl
151152

152153
windows:
154+
if: github.event_name != 'schedule' || github.repository_owner == 'python-pillow'
153155
name: Windows ${{ matrix.cibw_arch }}
154156
runs-on: windows-latest
155157
strategy:
@@ -256,7 +258,7 @@ jobs:
256258
path: dist/*.tar.gz
257259

258260
scientific-python-nightly-wheels-publish:
259-
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
261+
if: github.repository_owner == 'python-pillow' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
260262
needs: [build-2-native-wheels, windows]
261263
runs-on: ubuntu-latest
262264
name: Upload wheels to scientific-python-nightly-wheels
@@ -273,7 +275,7 @@ jobs:
273275
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
274276

275277
pypi-publish:
276-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
278+
if: github.repository_owner == 'python-pillow' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
277279
needs: [build-1-QEMU-emulated-wheels, build-2-native-wheels, windows, sdist]
278280
runs-on: ubuntu-latest
279281
name: Upload release to PyPI

0 commit comments

Comments
 (0)