I have a workflow with 3 jobs – basically a build, test, and deploy job.
For reasons that would be quite long to explain, the build job generates a unique version number that is the next version number in the deploy sequence. And the deploy job uses that version number to deploy successfully.
But if two builds kick off at about the same time, for example when someone pushes two commits at once, then both commits start to run in parallel and both the build job steps generate the same unique version number. This in turn causes whichever deploy step runs later to fail because a non-unique build number was used.
So my question is – is there any way that I can have a given workflow be aware of other worflows running that are of its same type – so that I could perhaps pause the second workflow from running temporarily or do something else.