Skip to content

chore: cancel running CI jobs if a new commit is pushed #534

Open

Description

@jamesmunns

We could apply something like this to cancel long running jobs like miri tests if we push multiple commits in succession:

https://www.meziantou.net/how-to-cancel-github-workflows-when-pushing-new-commits-on-a-branch.htm

concurrency:
  # github.workflow: name of the workflow
  # github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

  # Cancel in-progress runs when a new workflow with the same group name is triggered
  cancel-in-progress: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions