Workflow does not use same runner for all jobs

Hi everyone,

we have two self-hosted runners that are available for our repository. We noticed that GitHub Actions is not always using the same runner for all jobs inside a workflow. That is a problem because in our pipeline we have a build step where we build a .jar and in another step we use the .jar to build a docker image. Now if build and docker build use a different runner it will obviously fail. Is thery a way to make sure all jobs are executed on the same runner? I’m aware of the upload/download artifact actions, but isn’t there another way?

Best regards