Skip to main content

self_hosted_runners

Overview

Nameself_hosted_runners
TypeResource
Idgithub.actions.self_hosted_runners

Fields

NameDatatypeDescription
idintegerThe id of the runner.
namestringThe name of the runner.
busyboolean
labelsarray
osstringThe Operating System of the runner.
statusstringThe status of the runner.

Methods

NameAccessible byRequired ParamsDescription
get_self_hosted_runner_for_orgSELECTorg, runner_idGets a specific self-hosted runner configured in an organization.

You must authenticate using an access token with the admin:org scope to use this endpoint.
get_self_hosted_runner_for_repoSELECTowner, repo, runner_idGets a specific self-hosted runner configured in a repository.

You must authenticate using an access token with the repo scope to use this
endpoint.
list_self_hosted_runners_for_orgSELECTorgLists all self-hosted runners configured in an organization.

You must authenticate using an access token with the admin:org scope to use this endpoint.
list_self_hosted_runners_for_repoSELECTowner, repoLists all self-hosted runners configured in a repository. You must authenticate using an access token with the repo scope to use this endpoint.
list_self_hosted_runners_in_group_for_orgSELECTorg, runner_group_idThe self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "GitHub's products."

Lists self-hosted runners that are in a specific organization group.

You must authenticate using an access token with the admin:org scope to use this endpoint.
delete_self_hosted_runner_from_orgDELETEorg, runner_idForces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.

You must authenticate using an access token with the admin:org scope to use this endpoint.
delete_self_hosted_runner_from_repoDELETEowner, repo, runner_idForces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.

You must authenticate using an access token with the repo
scope to use this endpoint.
remove_self_hosted_runner_from_group_for_orgDELETEorg, runner_group_id, runner_idThe self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "GitHub's products."


Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.

You must authenticate using an access token with the admin:org scope to use this endpoint.
add_self_hosted_runner_to_group_for_orgEXECorg, runner_group_id, runner_idThe self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "GitHub's products."


Adds a self-hosted runner to a runner group configured in an organization.

You must authenticate using an access token with the admin:org
scope to use this endpoint.
create_registration_token_for_orgEXECorgReturns a token that you can pass to the config script. The token expires after one hour.

You must authenticate using an access token with the admin:org scope to use this endpoint.

#### Example using registration token

Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.

<br />./config.sh --url https://github.com/octo-org --token TOKEN<br />
create_registration_token_for_repoEXECowner, repoReturns a token that you can pass to the config script. The token expires after one hour. You must authenticate
using an access token with the repo scope to use this endpoint.

#### Example using registration token

Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.

<br />./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN<br />
create_remove_token_for_orgEXECorgReturns a token that you can pass to the config script to remove a self-hosted runner from an organization. The token expires after one hour.

You must authenticate using an access token with the admin:org scope to use this endpoint.

#### Example using remove token

To remove your self-hosted runner from an organization, replace TOKEN with the remove token provided by this
endpoint.

<br />./config.sh remove --token TOKEN<br />
create_remove_token_for_repoEXECowner, repoReturns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
You must authenticate using an access token with the repo scope to use this endpoint.

#### Example using remove token

To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.

<br />./config.sh remove --token TOKEN<br />
set_self_hosted_runners_in_group_for_orgEXECorg, runner_group_id, data__runnersThe self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "GitHub's products."

Replaces the list of self-hosted runners that are part of an organization runner group.

You must authenticate using an access token with the admin:org scope to use this endpoint.