From f5a1d5c7e235ad8860a4c2c5f259a43692bcbaab Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 23 Apr 2023 20:35:29 -0400 Subject: [PATCH] ci: Only run pypi actions from the main repo These will fail when run from forks because the necessary credentials aren't available. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 859b67c5..fdf77845 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: