Set allowed actions for a repository
Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for allowed_actions
must be configured to selected
. For more information, see “Set GitHub Actions permissions for a repository.”
If the repository belongs to an organization or enterprise that has selected
actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.
To use the patterns_allowed
setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the patterns_allowed
setting only applies to public repositories.
You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the administration
repository permission to use this API.
Path Parameters
Body
application/json
Body
selected-actions
Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions
organization.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*
, monalisa/octocat@v2
, monalisa/*
."
Response
204
Response
Response
Path Parameters
Body
List self-hosted runners for a repository
Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the repo
scope to use this endpoint.
Query Parameters
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Path Parameters
Response
200 application/json
Response
Response
A self hosted runner
Show Child Parameters
Path Parameters
Query Parameters
List runner applications for a repository
Lists binaries for the runner application that you can download and run.
You must authenticate using an access token with the repo
scope to use this endpoint.
Path Parameters
Response
200 application/json
Response
Response
Runner Application
A short lived bearer token used to download the runner, if needed.
Path Parameters
Create a registration token for a repository
Returns 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.
./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
Path Parameters
Response
201 application/json
Response
Response
Authentication Token
Authentication Token
The token used for authentication
Example:v1.1f699f1069f60xxx
The time this token expires
Example:2016-07-11T22:14:10Z
Example:{"issues":"read","deployments":"write"}
A git repository
Show Child Parameters
Example:config.yaml
Describe whether all repositories have been selected or there’s a selection involved
Allowed values:allselected
Path Parameters
Create a remove token for a repository
Returns 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.
./config.sh remove --token TOKEN
Path Parameters
Response
201 application/json
Response
Response
Authentication Token
Authentication Token
The token used for authentication
Example:v1.1f699f1069f60xxx
The time this token expires
Example:2016-07-11T22:14:10Z
Example:{"issues":"read","deployments":"write"}
A git repository
Show Child Parameters
Example:config.yaml
Describe whether all repositories have been selected or there’s a selection involved
Allowed values:allselected