Skip to content

Commit

Permalink
ci: forks can opt-out of CI branch push (Cirrus only)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Jun 25, 2024
1 parent 323b0ac commit e9bfbb5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ env: # Global defaults
# The above machine types are matched to each task by their label. Refer to the
# Cirrus CI docs for more details.
#
# When a contributor maintains a fork of the repo, any pull request they make
# to their own fork, or to the main repository, will trigger two CI runs:
# one for the branch push and one for the pull request.
# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
# in Cirrus repository settings, accessible from
# https://cirrus-ci.com/github/my-organization/my-repository
#
# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1
# ensures that previous containers and artifacts are cleared before each run.
# This requires installing Podman instead of Docker.
Expand Down Expand Up @@ -59,7 +66,10 @@ 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
# Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed,
# but still run CI when a PR is created.
# https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == ""
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks

base_template: &BASE_TEMPLATE
Expand Down

0 comments on commit e9bfbb5

Please sign in to comment.