Adds a repository to an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.addSelectedRepoToOrgSecret({org,secret_name,repository_id,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
repository_id | yes |
See also: GitHub Developer Guide documentation.
Cancels a workflow run using its id
. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.cancelWorkflowRun({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Creates or updates an organization secret with an encrypted value. Encrypt your secret usingLibSodium. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');const key = "base64-encoded-public-key";const value = "plain-text-secret";// Convert the message and key to Uint8Array's (Buffer implements that interface)const messageBytes = Buffer.from(value);const keyBytes = Buffer.from(key, 'base64');// Encrypt using LibSodium.const encryptedBytes = sodium.seal(messageBytes, keyBytes);// Base64 the encrypted secretconst encrypted = Buffer.from(encryptedBytes).toString('base64');console.log(encrypted);
Encrypt your secret using pynacl with Python 3.
from base64 import b64encodefrom nacl import encoding, publicdef encrypt(public_key: str, secret_value: str) -> str:"""Encrypt a Unicode string using the public key."""public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())sealed_box = public.SealedBox(public_key)encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))return b64encode(encrypted).decode("utf-8")
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Encrypt your secret using the rbnacl gem.
require "rbnacl"require "base64"key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")public_key = RbNaCl::PublicKey.new(key)box = RbNaCl::Boxes::Sealed.from_public_key(public_key)encrypted_secret = box.encrypt("my_secret")# Print the base64 encoded secretputs Base64.strict_encode64(encrypted_secret)
octokit.actions.createOrUpdateOrgSecret({org,secret_name,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
encrypted_value | no | Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint. |
key_id | no | ID of the key you used to encrypt the secret. |
visibility | no | Configures the access that repositories have to the organization secret. Can be one of: - |
selected_repository_ids | no | An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the |
See also: GitHub Developer Guide documentation.
Creates or updates a repository secret with an encrypted value. Encrypt your secret usingLibSodium. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');const key = "base64-encoded-public-key";const value = "plain-text-secret";// Convert the message and key to Uint8Array's (Buffer implements that interface)const messageBytes = Buffer.from(value);const keyBytes = Buffer.from(key, 'base64');// Encrypt using LibSodium.const encryptedBytes = sodium.seal(messageBytes, keyBytes);// Base64 the encrypted secretconst encrypted = Buffer.from(encryptedBytes).toString('base64');console.log(encrypted);
Encrypt your secret using pynacl with Python 3.
from base64 import b64encodefrom nacl import encoding, publicdef encrypt(public_key: str, secret_value: str) -> str:"""Encrypt a Unicode string using the public key."""public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())sealed_box = public.SealedBox(public_key)encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))return b64encode(encrypted).decode("utf-8")
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Encrypt your secret using the rbnacl gem.
require "rbnacl"require "base64"key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")public_key = RbNaCl::PublicKey.new(key)box = RbNaCl::Boxes::Sealed.from_public_key(public_key)encrypted_secret = box.encrypt("my_secret")# Print the base64 encoded secretputs Base64.strict_encode64(encrypted_secret)
octokit.actions.createOrUpdateRepoSecret({owner,repo,secret_name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
secret_name | yes | secret_name parameter |
encrypted_value | no | Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint. |
key_id | no | ID of the key you used to encrypt the secret. |
See also: GitHub Developer Guide documentation.
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 admin:org
scope to use this endpoint.
Configure your self-hosted runner, replacing TOKEN
with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org --token TOKEN
octokit.actions.createRegistrationTokenForOrg({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
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.
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
octokit.actions.createRegistrationTokenForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Returns 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.
To remove your self-hosted runner from an organization, replace TOKEN
with the remove token provided by this endpoint.
./config.sh remove --token TOKEN
octokit.actions.createRemoveTokenForOrg({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
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.
To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
./config.sh remove --token TOKEN
octokit.actions.createRemoveTokenForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
You must configure your GitHub Actions workflow to run when the workflow_dispatch
webhook event occurs. The inputs
are configured in the workflow file. For more information about how to configure the workflow_dispatch
event in the workflow file, see "Events that trigger workflows."
You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint. For more information, see "Creating a personal access token for the command line."
octokit.actions.createWorkflowDispatch({owner,repo,workflow_id,ref,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
ref | yes | The git reference for the workflow. The reference can be a branch or tag name. |
inputs | no | Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when |
inputs.* | no |
See also: GitHub Developer Guide documentation.
Deletes an artifact for a workflow run. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.deleteArtifact({owner,repo,artifact_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
artifact_id | yes | artifact_id parameter |
See also: GitHub Developer Guide documentation.
Deletes a secret in an organization using the secret name. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.deleteOrgSecret({org,secret_name,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
See also: GitHub Developer Guide documentation.
Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
octokit.actions.deleteRepoSecret({owner,repo,secret_name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
secret_name | yes | secret_name parameter |
See also: GitHub Developer Guide documentation.
Forces 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.
octokit.actions.deleteSelfHostedRunnerFromOrg({org,runner_id,});
name | required | description |
---|---|---|
org | yes | |
runner_id | yes | Unique identifier of the self-hosted runner. |
See also: GitHub Developer Guide documentation.
Forces 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.
octokit.actions.deleteSelfHostedRunnerFromRepo({owner,repo,runner_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
runner_id | yes | Unique identifier of the self-hosted runner. |
See also: GitHub Developer Guide documentation.
Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.deleteWorkflowRun({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Deletes all logs for a workflow run. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.deleteWorkflowRunLogs({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories
must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization."
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.disableSelectedRepositoryGithubActionsOrganization({org,repository_id,});
name | required | description |
---|---|---|
org | yes | |
repository_id | yes |
See also: GitHub Developer Guide documentation.
Disables a workflow and sets the state
of the workflow to disabled_manually
. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.disableWorkflow({owner,repo,workflow_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
See also: GitHub Developer Guide documentation.
Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location:
in the response header to find the URL for the download. The :archive_format
must be zip
. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.downloadArtifact({owner,repo,artifact_id,archive_format,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
artifact_id | yes | artifact_id parameter |
archive_format | yes |
See also: GitHub Developer Guide documentation.
Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look for Location:
in the response header to find the URL for the download. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.downloadJobLogsForWorkflowRun({owner,repo,job_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
job_id | yes | job_id parameter |
See also: GitHub Developer Guide documentation.
Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look forLocation:
in the response header to find the URL for the download. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.downloadWorkflowRunLogs({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories
must be must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization."
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.enableSelectedRepositoryGithubActionsOrganization({org,repository_id,});
name | required | description |
---|---|---|
org | yes | |
repository_id | yes |
See also: GitHub Developer Guide documentation.
Enables a workflow and sets the state
of the workflow to active
. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.enableWorkflow({owner,repo,workflow_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
See also: GitHub Developer Guide documentation.
Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions
must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization.""
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.getAllowedActionsOrganization({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for allowed_actions
must be configured to selected
. For more information, see "Set GitHub Actions permissions for a repository."
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.
octokit.actions.getAllowedActionsRepository({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getArtifact({owner,repo,artifact_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
artifact_id | yes | artifact_id parameter |
See also: GitHub Developer Guide documentation.
Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.getGithubActionsPermissionsOrganization({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.
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.
octokit.actions.getGithubActionsPermissionsRepository({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getJobForWorkflowRun({owner,repo,job_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
job_id | yes | job_id parameter |
See also: GitHub Developer Guide documentation.
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.getOrgPublicKey({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.getOrgSecret({org,secret_name,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
See also: GitHub Developer Guide documentation.
Deprecated: This method has been renamed to actions.getGithubActionsPermissionsRepository
Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.
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.
octokit.actions.getRepoPermissions({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the secrets
repository permission to use this endpoint.
octokit.actions.getRepoPublicKey({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
octokit.actions.getRepoSecret({owner,repo,secret_name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
secret_name | yes | secret_name parameter |
See also: GitHub Developer Guide documentation.
Gets 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.
octokit.actions.getSelfHostedRunnerForOrg({org,runner_id,});
name | required | description |
---|---|---|
org | yes | |
runner_id | yes | Unique identifier of the self-hosted runner. |
See also: GitHub Developer Guide documentation.
Gets a specific self-hosted runner configured in a repository.
You must authenticate using an access token with the repo
scope to use this endpoint.
octokit.actions.getSelfHostedRunnerForRepo({owner,repo,runner_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
runner_id | yes | Unique identifier of the self-hosted runner. |
See also: GitHub Developer Guide documentation.
Gets a specific workflow. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getWorkflow({owner,repo,workflow_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
See also: GitHub Developer Guide documentation.
Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getWorkflowRun({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getWorkflowRunUsage({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.getWorkflowUsage({owner,repo,workflow_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
See also: GitHub Developer Guide documentation.
Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.listArtifactsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
octokit.actions.listJobsForWorkflowRun({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes | |
filter | no | Filters jobs by their |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.listOrgSecrets({org,});
name | required | description |
---|---|---|
org | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the secrets
repository permission to use this endpoint.
octokit.actions.listRepoSecrets({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.listRepoWorkflows({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists binaries for the runner application that you can download and run.
You must authenticate using an access token with the admin:org
scope to use this endpoint.
octokit.actions.listRunnerApplicationsForOrg({org,});
name | required | description |
---|---|---|
org | yes |
See also: GitHub Developer Guide documentation.
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.
octokit.actions.listRunnerApplicationsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.
Lists all repositories that have been selected when the visibility
for repository access to a secret is set to selected
. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.listSelectedReposForOrgSecret({org,secret_name,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
See also: GitHub Developer Guide documentation.
Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories
must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization."
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.listSelectedRepositoriesEnabledGithubActionsOrganization({org,});
name | required | description |
---|---|---|
org | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists all self-hosted runners configured in an organization.
You must authenticate using an access token with the admin:org
scope to use this endpoint.
octokit.actions.listSelfHostedRunnersForOrg({org,});
name | required | description |
---|---|---|
org | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the repo
scope to use this endpoint.
octokit.actions.listSelfHostedRunnersForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.listWorkflowRunArtifacts({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List all workflow runs for a workflow. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope.
octokit.actions.listWorkflowRuns({owner,repo,workflow_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
workflow_id | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
actor | no | Returns someone's workflow runs. Use the login for the user who created the |
branch | no | Returns workflow runs associated with a branch. Use the name of the branch of the |
event | no | Returns workflow run triggered by the event you specify. For example, |
status | no | Returns workflow runs with the check run |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo
scope. GitHub Apps must have the actions:read
permission to use this endpoint.
octokit.actions.listWorkflowRunsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
actor | no | Returns someone's workflow runs. Use the login for the user who created the |
branch | no | Returns workflow runs associated with a branch. Use the name of the branch of the |
event | no | Returns workflow run triggered by the event you specify. For example, |
status | no | Returns workflow runs with the check run |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Removes a repository from an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.removeSelectedRepoFromOrgSecret({org,secret_name,repository_id,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
repository_id | yes |
See also: GitHub Developer Guide documentation.
Re-runs your workflow run using its id
. You must authenticate using an access token with the repo
scope to use this endpoint. GitHub Apps must have the actions:write
permission to use this endpoint.
octokit.actions.reRunWorkflow({owner,repo,run_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
run_id | yes |
See also: GitHub Developer Guide documentation.
Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions
must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization."
If the organization belongs to an enterprise that has selected
actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.
To use the patterns_allowed
setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the patterns_allowed
setting only applies to public repositories in the organization.
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.setAllowedActionsOrganization({org,github_owned_allowed,verified_allowed,patterns_allowed,});
name | required | description |
---|---|---|
org | yes | |
github_owned_allowed | yes | Whether GitHub-owned actions are allowed. For example, this includes the actions in the |
verified_allowed | yes | Whether actions in GitHub Marketplace from verified creators are allowed. Set to |
patterns_allowed | yes | Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, |
See also: GitHub Developer Guide documentation.
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.
octokit.actions.setAllowedActionsRepository({owner,repo,github_owned_allowed,verified_allowed,patterns_allowed,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
github_owned_allowed | yes | Whether GitHub-owned actions are allowed. For example, this includes the actions in the |
verified_allowed | yes | Whether actions in GitHub Marketplace from verified creators are allowed. Set to |
patterns_allowed | yes | Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, |
See also: GitHub Developer Guide documentation.
Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as allowed_actions
to selected
actions, then you cannot override them for the organization.
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.setGithubActionsPermissionsOrganization({org,enabled_repositories,});
name | required | description |
---|---|---|
org | yes | |
enabled_repositories | yes | The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: |
allowed_actions | no | The permissions policy that controls the actions that are allowed to run. Can be one of: |
See also: GitHub Developer Guide documentation.
Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.
If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as allowed_actions
to selected
actions, then you cannot override them for the repository.
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.
octokit.actions.setGithubActionsPermissionsRepository({owner,repo,enabled,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
enabled | yes | Whether GitHub Actions is enabled on the repository. |
allowed_actions | no | The permissions policy that controls the actions that are allowed to run. Can be one of: |
See also: GitHub Developer Guide documentation.
Replaces all repositories for an organization secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the secrets
organization permission to use this endpoint.
octokit.actions.setSelectedReposForOrgSecret({org,secret_name,});
name | required | description |
---|---|---|
org | yes | |
secret_name | yes | secret_name parameter |
selected_repository_ids | no | An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the |
See also: GitHub Developer Guide documentation.
Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories
must be configured to selected
. For more information, see "Set GitHub Actions permissions for an organization."
You must authenticate using an access token with the admin:org
scope to use this endpoint. GitHub Apps must have the administration
organization permission to use this API.
octokit.actions.setSelectedRepositoriesEnabledGithubActionsOrganization({org,selected_repository_ids,});
name | required | description |
---|---|---|
org | yes | |
selected_repository_ids | yes | List of repository IDs to enable for GitHub Actions. |
See also: GitHub Developer Guide documentation.