Open smuuf opened 4 years ago
At the very simplest, I imagine this could be implemented by waiting for the job to finish - poll the API and wait for the target job status to change to one of the final states (success/failure): https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run. This would introduce new settings:
For anyone interested, I've taken a stab at this (and am starting to use it in GA workflows) - feel free to have a look at #139 and test the changes from my repository (use commit hash instead of a version)
I've added another PR for this after the previous one grew outdated: #347
The idea is that this would introduce better options for parallelization inside a workflow.
If I understand right, currently only
jobs
canneed
(wait) for otherjobs
to finish.If job B expects an artifact from job A, it must wait for job A to finish completely.
If job B was able to wait (block) for some artifact from job A, it would allow us to run both
jobs
at the same time and do their stuff (for example build Docker images and prepare other stuff, which can take quite a lot of time) simultaneously. Then, job B could simply wait until job A uploads expected artifact - and then job B could continue, being sure that it has everything it needs.Obviously some kind of
timeout
configuration should be possible (mandatory?), after which the step would fail, if the expected artifact never appeared.I'm just wondering if such idea makes sense to anyone else, too? 🤔 Or is there already some way how to do this kind of thing?