Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hmanzur/actions-set-secret
Create or update secrets in github repository
https://github.com/hmanzur/actions-set-secret
docker github-actions nodejs secrets-management
Last synced: 11 days ago
JSON representation
Create or update secrets in github repository
- Host: GitHub
- URL: https://github.com/hmanzur/actions-set-secret
- Owner: hmanzur
- License: mit
- Created: 2020-08-08T17:50:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-30T11:31:15.000Z (almost 2 years ago)
- Last Synced: 2024-10-26T10:49:55.369Z (13 days ago)
- Topics: docker, github-actions, nodejs, secrets-management
- Language: JavaScript
- Homepage:
- Size: 215 KB
- Stars: 47
- Watchers: 5
- Forks: 33
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Set Secret Action
Create or edit actions secrets in repository or organizations
## Usage
### Inputs
### name
**Required** `String` Secret name.
### value
**Required** `String` Secret value to store.
### token
**Required** `String` Repository [Access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
### repository
**Required** `String` Repository or organization to store. Default `github.repository` [context](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context)
### org
`Boolean` Indicates the repo is an [organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-organizations). Default `false`
### visibility
`String` that configures the access that repositories have to the organization secret.
Options are `all`, `private`, `selected`### selected_repository_ids
### Outputs
### status
Response status code
### data
Response json payload
## Examples
### For personal repo
```YAML
uses: hmanzur/[email protected]
with:
name: 'MY_SECRET_NAME'
value: 'Lorem ipsun dolor simit'
repository: hmanzur/actions-set-secret
token: ${{ secrets.REPO_ACCESS_TOKEN }}
```### For organizations
```YAML
uses: hmanzur/[email protected]
with:
name: 'MY_SECRET_NAME'
value: 'Lorem ipsun dolor simit'
repository: 'my-org'
token: ${{ secrets.REPO_ACCESS_TOKEN }}
org: true
visibility: 'all'
```## References
### References for repository
- [Get a repository public key](https://developer.github.com/v3/actions/secrets/#get-a-repository-public-key)
- [Create or update repository secret](https://developer.github.com/v3/actions/secrets/#create-or-update-a-repository-secret)### References for organization
- [Get an organization public key](https://developer.github.com/v3/actions/secrets/#get-an-organization-public-key)
- [Create or update an organization secret](https://developer.github.com/v3/actions/secrets/#create-or-update-an-organization-secret)