Mutually exclusive pipelines

Hi, not sure where or how to ask but I’m trying to setup a pipeline that I want to be mutually exclusive such that only one pipeline can run at a time, even across commits. Is that possible?

1 Like

Hi, can you please elaborate what you are trying to do. If you want an action to be mutually exclusive you can use the if condition to prevent a workflow from running (Context and expression syntax for GitHub Actions - GitHub Docs). You can also use the github api to get the list of recent action runs and use the if condition on that.

The rather new concurrency feature might be what you are looking for:

If you add the following to the top-level of a workflow, then only a single run of this workflow will run at a time:

concurrency: ${{ github.workflow }}