Cancel in-progress GitHub Actions runs when PRs are updated
- Dominant language
- No language data
- Stars
- 3.4k
- Forks
- 679
- PR merge metrics
- No merged PRs in 30d
Description
### 🤔 What's the problem you're trying to solve?
We are currently using GitHub-hosted runners, which gives us 20 instances. This effectively means that in the whole cucumber organization we can have at most 20 actions running concurrently. This should be sufficient for normal use.
However, when the main branch is updated, Renovate will rebase all open PRs. When the main branch is updated rapidly due to merging a sequence of PRs or a large number or renovate PRs, this creates a cascade of actions drowning out CI for the whole organization.
### ✨ What's your proposed solution?
By canceling in-progress GitHub Actions we can limit this. See examples in GitHub documentation [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency#example-using-a-fallback-value) and [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow). [Applied example from the JUnit Team](https://github.com/junit-team/junit-framework/pull/4841).
### ⛏ Have you considered any alternatives or workarounds?
We can limit language specific actions to changes in language specific folders. But we've applied that (almost) everywhere already.
### 📚 Any additional context?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.