name | example | route | scope | type |
---|---|---|---|---|
Create a repository variable |
octokit.rest.actions.createRepoVariable({ owner, repo, name, value }) |
POST /repos/{owner}/{repo}/actions/variables |
actions |
API method |
Creates a repository variable that you can reference in a GitHub Actions workflow.
You must authenticate using an access token with the repo
scope to use this endpoint.
GitHub Apps must have the actions_variables:write
repository permission to use this endpoint.
octokit.rest.actions.createRepoVariable({
owner,
repo,
name,
value,
});
name | required | description |
---|---|---|
owner | yes |
The account owner of the repository. The name is not case sensitive. |
repo | yes |
The name of the repository. The name is not case sensitive. |
name | yes |
The name of the variable. |
value | yes |
The value of the variable. |
See also: GitHub Developer Guide documentation.