Run workflow only when the previous run is completed #55027
-
Select Topic AreaQuestion BodyHi Team, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
To solve this you can use concurency groups either on the job level or on the workflow level. For you, probably the latter, for example name: merge ci stuff
concurrency:
group: ${{ github.workflow }}which should only let workflows that fit this group run one at a time you can also cancel runs from the same group when a new one is queued using You can find examples for cuncurency groups here |
Beta Was this translation helpful? Give feedback.
-
|
You can prevent overlapping workflow runs by using GitHub Actions concurrency at the workflow level so only one run executes at a time. Add a concurrency group like this: concurrency: This ensures that if another run is triggered while one is already running, it will be queued instead of starting immediately. If you instead want new runs to cancel previous ones automatically, set cancel-in-progress: true. Defining concurrency at the workflow level is ideal when you only have one runner and want the full pipeline to execute sequentially without manual checks. |
Beta Was this translation helpful? Give feedback.
To solve this you can use concurency groups either on the job level or on the workflow level. For you, probably the latter, for example
which should only let workflows that fit this group run one at a time
you can also cancel runs from the same group when a new one is queued using
cancel-in-progress: trueYou can find examples for cuncurency groups here