Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.24 KB

createRepoVariable.md

File metadata and controls

58 lines (44 loc) · 1.24 KB
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

Create a repository variable

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,
});

Parameters

name required description
owneryes

The account owner of the repository. The name is not case sensitive.

repoyes

The name of the repository. The name is not case sensitive.

nameyes

The name of the variable.

valueyes

The value of the variable.

See also: GitHub Developer Guide documentation.