From 7b041e53cc3f106b027aec2ac920569746ada3ce Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 2 Mar 2021 16:37:54 -0500 Subject: [PATCH] Avoid running CI jobs on both push and pull_request events. When pushing changes to a branch, CI would run **double** the jobs (one set of CI jobs for the branch push event, and another set of jobs for the `pull_request` event). This change tweaks the CI hooks to only run for pull requests **targeting** `master` and branches named `master` (also allow `v*` style release branches, just in case we wanted them in the future). --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d7420af0..ee236d289 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,14 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - master + - 'v*' # prior release branches (e.g. `v0.30.x` branch) + tags: + - 'v*' + pull_request: + branches: [ master ] jobs: discover_matrix: