Skip to content

Commit 5aba563

Browse files
committed
Rewrite conditions; add versioning for previous GHES versions
1 parent ef22a15 commit 5aba563

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

content/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,17 @@ These labels operate cumulatively, so a self-hosted runner’s labels must match
7070

7171
When routing a job to a self-hosted runner, {% data variables.product.prodname_dotcom %} looks for a runner that matches the job's `runs-on` labels:
7272

73-
- {% data variables.product.prodname_dotcom %} first searches for an online and enabled runner at the repository level, then at the organization level{% ifversion ghes or ghae %}, then at the enterprise level{% endif %}.
74-
- If {% data variables.product.prodname_dotcom %} doesn't find an online and enabled runner at any level, the job is queued to all levels and waits for any runner from any level to come online and pickup the job.
73+
{% ifversion fpt or ghes > 3.2 or ghae %}
74+
- {% data variables.product.prodname_dotcom %} first searches for an online and idle runner at the repository level, then at the organization level, and if the organization is part of an enterprise, then at the enterprise level.
75+
- If {% data variables.product.prodname_dotcom %} finds an online and idle runner at a certain level that matches the job's `runs-on` labels, the job is then assigned and sent to the runner.
76+
- If the runner doesn't pick up the assigned job within 60 seconds, the job is queued at all levels and waits for a matching runner from any level to come online and pick up the job.
77+
- If {% data variables.product.prodname_dotcom %} doesn't find an online and idle runner at any level, the job is queued to all levels and waits for a matching runner from any level to come online and pick up the job.
78+
- If the job remains queued for more than 24 hours, the job will fail.
79+
{% elsif ghes < 3.3 %}
80+
1. {% data variables.product.prodname_dotcom %} first searches for a runner at the repository level, then at the organization level, then at the enterprise level.
81+
2. The job is then sent to the first matching runner that is online and idle.
82+
- If all matching online runners are busy, the job will queue at the level with the highest number of matching online runners.
83+
- If all matching runners are offline, the job will queue at the level with the highest number of matching offline runners.
84+
- If there are no matching runners at any level, the job will fail.
7585
- If the job remains queued for more than 24 hours, the job will fail.
76-
- If {% data variables.product.prodname_dotcom %} finds an online and enabled runner (preferred runner) at a certain level, the job is then sent to the preferred runner.
77-
- If the job is not picked up by the preferred runner within 60 seconds after sending the job, {% data variables.product.prodname_dotcom %} will try send the same job to all other levels as well.
78-
- If the job remains queued for more than 24 hours, the job will fail.
86+
{% endif %}

0 commit comments

Comments
 (0)