]> git.ipfire.org Git - thirdparty/git.git/commit
ci: avoid unnecessary builds
authorTaylor Blau <me@ttaylorr.com>
Tue, 8 Nov 2022 18:25:45 +0000 (13:25 -0500)
committerTaylor Blau <me@ttaylorr.com>
Tue, 8 Nov 2022 18:26:20 +0000 (13:26 -0500)
commiteb5b03a9c0a0c8b4d82ece6069821de41b06722b
treef4a34a33ed8727f1e7ce79a5c81fd35e36babf86
parent3b08839926fcc7cc48cf4c759737c1a71af430c1
ci: avoid unnecessary builds

Whenever a branch is pushed to a repository which has GitHub Actions
enabled, a bunch of new workflow runs are started.

We sometimes see contributors push multiple branch updates in rapid
succession, which in conjunction with the impressive time swallowed by
even just a single CI build frequently leads to many queued-up runs.

This is particularly problematic in the case of Pull Requests where a
single contributor can easily (inadvertently) prevent timely builds for
other contributors when using a shared repository.

To help with this situation, let's use the `concurrency` feature of
GitHub workflows, essentially canceling GitHub workflow runs that are
obsoleted by more recent runs:

  https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

For workflows that *do* want the behavior in the pre-image of this
patch, they can use the ci-config feature to disable the new behavior by
adding an executable script on the ci-config branch called
'skip-concurrent' which terminates with a non-zero exit code.

Original-patch-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
.github/workflows/check-whitespace.yml
.github/workflows/l10n.yml
.github/workflows/main.yml