From fa194ab52ce2dccf1671b68c45c60dd9b3252849 Mon Sep 17 00:00:00 2001 From: marco Date: Fri, 28 Jul 2023 14:48:18 +0200 Subject: [PATCH] ci: Avoid lint compute-credits on forks Currently `lint` may run on forks and eat up Cirrus CI credits. Fix this. It can be trivially enabled by forks, if they want to. --- .cirrus.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1b6bb9ff991..78cd3502d46 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,8 +3,9 @@ container: cpu: 1 memory: 1G lint_task: - use_compute_credits: true - only_if: $CIRRUS_BASE_BRANCH == 'main' + use_compute_credits: $CIRRUS_REPO_OWNER == 'bitcoin-core' # https://cirrus-ci.org/pricing/#compute-credits + # https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution: Skip needless compute on non-pulls + skip: $CIRRUS_PR == "" stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks setup_script: apt-get update && apt-get install -y git libgpgme-dev merge_base_script: