A GitHub Action for updating Github Variables
Updates Github Variable for a repository or organization.
- uses: mmoyaferrer/[email protected]
with:
name: 'SAMPLE_VAR'
value: 'Hello World'
repository: mmoyaferrer/set-github-variable
token: ${{ secrets.REPO_ACCESS_TOKEN }}- Create a Github Variable for your repo/organization.
- Create an access token with access to manage actions repository variables.
It does not require to do checkout and it's independent on the Github runner/docker container used.
The following are required
| Name | Type | Description |
|---|---|---|
name |
String | Variable name |
value |
String | Variable value |
repository |
String | Repository name, with format <organization>/<repository> i.e mmoyaferrer/set-github-variable |
token |
String | Repository Token |
The following are optional, to be provided when the value is Org scoped instead of a repository variable:
| Name | Type | Description |
|---|---|---|
org |
Boolean | Details if the variable belongs to an organization (default is false) |
visibility |
String | Configures access to the repositorys in the org, see more |
selectedRepositoryIds |
String[Integer] | Array of repositories ids where to update the org-scoped variable, see more |
The following outputs can be accessed via ${{ steps.<step-id>.outputs }} from this action
| Name | Type | Description |
|---|---|---|
data |
String | Response data from Github API |
status |
Integer | Response code from Github API |