Skip to content

Commit f5a1d5c

Browse files
committed
ci: Only run pypi actions from the main repo
These will fail when run from forks because the necessary credentials aren't available.
1 parent 1849ef6 commit f5a1d5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
name: Upload to PyPI (test)
6969
needs: [build_wheels, build_sdist]
7070
runs-on: ubuntu-22.04
71-
if: github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
71+
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
7272
steps:
7373
- uses: actions/download-artifact@v3
7474
with:
@@ -86,7 +86,7 @@ jobs:
8686
name: Upload to PyPI (prod)
8787
needs: [build_wheels, build_sdist]
8888
runs-on: ubuntu-22.04
89-
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
89+
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
9090
steps:
9191
- uses: actions/download-artifact@v3
9292
with:

0 commit comments

Comments
 (0)