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.
runner_group_idintegerThe id of the runner group.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.

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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.

Example using registration token:

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

config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.

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.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.

Example using remove token:

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

config.sh remove --token TOKEN
generate_runner_jitconfig_for_orgEXECorg, data__labels, data__name, data__runner_group_idGenerates a configuration that can be passed to the runner application at startup.

You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
generate_runner_jitconfig_for_repoEXECowner, repo, data__labels, data__name, data__runner_group_idGenerates a configuration that can be passed to the runner application at startup.

You must authenticate using an access token with the repo scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.