In my case I have a workflow with four jobs:
- Job 1 builds a Docker image and then pushes to it Dockerhub.
- Job 2 runs unit tests.
- Job 3 runs security scans.
- Job 4 waits for the above 3 jobs to finish and then pulls the built Docker image from Dockerhub and runs some smoke tests on it.
Pulling the Docker image in job 4 wastes a lot of time. Is there a recommended way for passing Docker images between jobs in a workflow?
Ideally we’d like to combine job 1 and 4 for the best performance, but because of job 2 and 3 being a dependency of job 4, we can’t do that.