Skip to main content

runner_registration_tokens

Creates, updates, deletes, gets or lists a runner_registration_tokens resource.

Overview

Namerunner_registration_tokens
TypeResource
Idgithub.actions.runner_registration_tokens

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_registration_token_for_repoinsertowner, repoReturns a token that you can pass to the config script. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

<br />./config.sh --url https://github.com/octo-org --token TOKEN<br />

Authenticated users must have admin access to the repository to use this endpoint.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
create_registration_token_for_orginsertorgReturns a token that you can pass to the config script. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

<br />./config.sh --url https://github.com/octo-org --token TOKEN<br />

Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need theadmin:org scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

INSERT examples

Returns a token that you can pass to the config script. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

<br />./config.sh --url https://github.com/octo-org --token TOKEN<br />

Authenticated users must have admin access to the repository to use this endpoint.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

INSERT INTO github.actions.runner_registration_tokens (
owner,
repo
)
SELECT
'{{ owner }}',
'{{ repo }}'
RETURNING
expires_at,
permissions,
repositories,
repository_selection,
single_file,
token
;