Limiting concurrent workflows and jobs

I have a similar use case as mentioned in this old topic.

We have run into a situation where two PRs are merged within a few seconds of each other and due to the dynamic nature of CircleCI build environments sometimes the one merged second finishes first and triggers a deployment. Then the first one completes and triggers another deployment. Our deployment software limits one concurrent deployment job, but in this case, the “older” commit gets deployed over the “newer”.

I would like to be able to enforce certain jobs run in order. GitHub Actions has a concurrency key that provides more granularity than the “Auto-cancel redundant workflows” option in CircleCI.

1 Like