From 5b656b9f2ee178a2dfc9eb859920c950a391255a Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 18 Jan 2024 12:48:57 +0100 Subject: [PATCH] ci: do not run CI on fork branch push --- .cirrus.yml | 7 ++++++- .github/workflows/ci.yml | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6628d0bbbbb0f0..ef465456c738d1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -48,7 +48,12 @@ env: # Global defaults # https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks filter_template: &FILTER_TEMPLATE - skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution + # No need to run on the read-only mirror, unless it is a PR. + # https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution + skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" + # Do not run branch pushes on forks, because they are typically redundant with + # pull requests to the main repo. + skip: $CIRRUS_REPO_OWER != "bitcoin" && $CIRRUS_REPO_OWER != "bitcoin-core" && $CIRRUS_PR == "" stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks base_template: &BASE_TEMPLATE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8262b9f90f65e..ab1131a57cd2af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,10 @@ on: # See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push. push: branches: - - '**' + # Do not run branch pushes on forks, because they are typically redundant with + # pull requests to the main repo. + - 'bitcoin/**' + - 'bitcoin-core/**' tags-ignore: - '**'