How to change concurrent (parallel) jobs number? #26586
-
I have created a workflow, where I want it should run 1 at a time instead of running in parallel. BTW, I am talking about these concurrent jobs |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
A workflow has jobs, a job has steps. You’re describing the concurrency of workflows, not jobs – minor distinction in language but important when thinking about the documentation and how you solve this problem. GitHub Actions do not currently support managing workflow concurrency but there is an action called turnstyle which will block workflows, meaning that only one can run at a time. This is less than perfect as a solution (because you’ll be charged for the waiting job minutes) but it will allow for your use-case of enforcing a concurrency limit of 1 for workflows. That said, if you do have a dependency between workflows, it is a sign that you may wish to reconsider whether multiple workflows is appropriate and if instead it should be dependent jobs (using |
Beta Was this translation helpful? Give feedback.
-
Ah! Sorry for incorrect terminology. I wasn’t sure how to actually say it. Anyway, using turnstyle might fulfil my use-case for now. But as it will cost even if the other workflows are waiting in queue.
|
Beta Was this translation helpful? Give feedback.
-
I did some further digging and you could use the new Set your first workflow (e.g:
|
Beta Was this translation helpful? Give feedback.
-
There’s a new feature that you can use to limit the concurrency of workflows:
We have recently shipped a feature that will enable you to configure workflow level concurrency for some scenarios GitHub Actions: Limit workflow run or job concurrency - GitHub Changelog. |
Beta Was this translation helpful? Give feedback.
There’s a new feature that you can use to limit the concurrency of workflows: