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 was fixed for Cirrus in e9bfbb5414ab14ca14d8edcfdf77f28c9ed67c33, but it relies on setting a custom variable which Github CI lacks.
This PR therefore disables Github CI runs on branch pushes for forks entirely.
After this PR, pushes made to git branches inside fork repositories will no longer trigger CI runs, unless the git branches are associated with PRs in the fork repository, or the main repository.
This was was originally part of #29274, but left out in order for that PR to be entirely about Cirrus CI. It was suggested as a followup in #29274 (comment).
I’ve been using this commit in #29432 (on this repo) and https://github.com/Sjors/bitcoin/pull/48 (my fork).