Skip to content

Cancel in-progress GitHub Actions runs when PRs are updated #2269

@mpkorstanje

Description

@mpkorstanje

🤔 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 and here. Applied example from the JUnit Team.

⛏ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions