From 70c19f2b77bd12606a51c427b61afa9992d4d423 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 1 May 2023 09:47:10 +0100 Subject: [PATCH 1/3] Don't run the daily test on contributors' GitHub forks I'm currently getting a daily email informing me that the pyperformance tests failed on the `AlexWaygood/pyperformance` repo (because I enabled workflows for my fork). This PR makes it so that the `test` workflow only happens on `python/pyperformance`, not on contributors' forks of the repo (unless they specifically request the workflow by manually triggering the workflow or by making a PR to their fork). --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e9b8243..f0404799 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,7 @@ jobs: permissions: pull-requests: write name: ${{ matrix.os }} - ${{ matrix.python }} + if: ${{ github.repository == 'python/pyperformance' || github.event_name != 'schedule' || github.event_name != 'pull_request' }} strategy: fail-fast: false matrix: From 7a6f06d6933c97c6927039ef2f62a3e8009f39c0 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 1 May 2023 10:56:03 +0100 Subject: [PATCH 2/3] fix (thanks Hugo!) --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f0404799..58a33666 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: permissions: pull-requests: write name: ${{ matrix.os }} - ${{ matrix.python }} - if: ${{ github.repository == 'python/pyperformance' || github.event_name != 'schedule' || github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'schedule' || (github.repository == 'python/pyperformance' || && github.event_name == 'schedule') }} strategy: fail-fast: false matrix: From 16cef5fe7d87ebcaf3836a381a457ba47c089ca0 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 1 May 2023 10:57:21 +0100 Subject: [PATCH 3/3] syntax --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58a33666..becf1a59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: permissions: pull-requests: write name: ${{ matrix.os }} - ${{ matrix.python }} - if: ${{ github.event_name != 'schedule' || (github.repository == 'python/pyperformance' || && github.event_name == 'schedule') }} + if: ${{ github.event_name != 'schedule' || (github.repository == 'python/pyperformance' && github.event_name == 'schedule') }} strategy: fail-fast: false matrix: