From 1f830a3626cb7fddcaf58b577cefdab325a0d6a4 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 13 Nov 2020 17:08:20 +0000 Subject: [PATCH] Improve Github triggers to prevent multiple runs on origin branches --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e4eea1b..6224df00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,10 @@ on: pull_request: paths-ignore: - 'docs/**' + branches: + # PRs from branches on the origin repo get a build from the 'push' + # trigger. So the pull_request trigger is limited to fork branches + - '**:**' jobs: pre-commit: @@ -16,9 +20,6 @@ jobs: - uses: pre-commit/action@v2.0.0 test: - # skip branch builds on joerick/cibuildwheel, but always build `master` and pull requests - if: github.repository != 'joerick/cibuildwheel' || github.ref == 'refs/heads/master' || github.event_name == 'pull_request' - name: Test cibuildwheel on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: