Skip to content

Commit

Permalink
ci: Only run pypi actions from the main repo
Browse files Browse the repository at this point in the history
These will fail when run from forks because the necessary
credentials aren't available.
  • Loading branch information
bdarnell committed Apr 24, 2023
1 parent 1849ef6 commit f5a1d5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
name: Upload to PyPI (test)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
steps:
- uses: actions/download-artifact@v3
with:
Expand All @@ -86,7 +86,7 @@ jobs:
name: Upload to PyPI (prod)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit f5a1d5c

Please sign in to comment.