-
If I have 2 self-hosted runners matching the tags for all the steps within the workflow, is it possible for jobs to be assigned to different runners (i.e steps 1-2 on one machine, 3-4 on other). Sequence of steps is defined (i.e |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
In the workflow, once a runner is assigned to a job, all the steps in this job run only on this runner, and you are not able to assign another runner to some of the steps. If you wants to assign special self-hosted runners to different jobs in the workflow, you can add different labels for each self-hosted runner to distinguish them. Then you can assign special self-hosted runner to each job according to the different labels. To view more details, you can see the docs below: |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue as @rsolovev. I have setup a workflow with multiple dependent jobs, e.g., job1 -> job2 -> job3 -> ... Is it possible to enforce that all jobs of a single workflow are scheduled on the same runner? I have multiple runners which could potentially run the workflow but the jobs have dependencies which requires them be be run in order on the same runner. I saw the possibility to add custom labels but this does not sound like a solution to me as both runners are potentially capable of running the workflow. |
Beta Was this translation helpful? Give feedback.
@rsolovev,
In the workflow, once a runner is assigned to a job, all the steps in this job run only on this runner, and you are not able to assign another runner to some of the steps.
If you wants to assign special self-hosted runners to different jobs in the workflow, you can add different labels for each self-hosted runner to distinguish them. Then you can assign special self-hosted runner to each job according to the different labels.
To view more details, you can see the docs below:
https://help.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow#using-custom-labels-to-route-jobs