From f2705ec3e467532caff59f9d46baefc3c1c349bd Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 5 Aug 2024 10:19:28 -0400 Subject: [PATCH] ci: don't run CI twice for my own pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `on: [push, pull_request]` has the effect that CI runs twice if I push to a feature branch in my repo and then make a pull request – once for the push to the feature branch, and once for the PR. Instead, only run CI on pushes to the main branch (and on all PRs). --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c0d4a5..83ce5a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Build and test -on: [push, pull_request] +on: {push: branches: [main], pull_request:} jobs: build: