]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
ci: Only run pypi actions from the main repo 3257/head
authorBen Darnell <ben@bendarnell.com>
Mon, 24 Apr 2023 00:35:29 +0000 (20:35 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 24 Apr 2023 01:04:56 +0000 (21:04 -0400)
These will fail when run from forks because the necessary
credentials aren't available.

.github/workflows/build.yml

index 859b67c5faac3a8273073198e3a0c7649e854f8f..fdf778458016b2085a74c7dda68f5daee0ff7869 100644 (file)
@@ -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:
@@ -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: