Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dacbd/gha-secrets
Create or update your GitHub Actions secrets.
https://github.com/dacbd/gha-secrets
Last synced: 21 days ago
JSON representation
Create or update your GitHub Actions secrets.
- Host: GitHub
- URL: https://github.com/dacbd/gha-secrets
- Owner: dacbd
- License: mit
- Created: 2022-02-24T17:01:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T01:04:09.000Z (7 months ago)
- Last Synced: 2024-04-14T09:14:24.197Z (7 months ago)
- Language: JavaScript
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gha-secrets
[![Test Action](https://github.com/dacbd/gha-secrets/actions/workflows/test.yml/badge.svg)](https://github.com/dacbd/gha-secrets/actions/workflows/test.yml) [![CodeQL](https://github.com/dacbd/gha-secrets/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/dacbd/gha-secrets/actions/workflows/codeql-analysis.yml)Create or update your GitHub Actions secrets.
It's probably simpler to just use the [gh cli](https://cli.github.com/manual/gh_secret_set) which [is installed on GitHub runners](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#cli-tools)
> :warning: The new Secret value wont change for the workflow using this action or any jobs currently running :warning:
## Options
| option | value | notes |
| ------------ | ------------ | ------------ |
| `token` | GitHub Token w/ correct permissions | `required` |
| `location` | Where the secret is `repo`, `org`, `(evnironment name)` | defaults to `repo`/`repository` |
| `name` | Name of the secret to update | `required` |
| `value` | New value to update with | `required` |
| `visibility` | required for [org secrets](https://docs.github.com/en/rest/reference/actions#create-or-update-an-organization-secret) | defaults to `selected` |## Usage
```yml
- id: generate_secret
run: Generate my token
- uses: dacbd/gha-secrets@v1
with:
token: ${{ secrets.TOKEN }}
name: 'GHA_SECRETS_TEST'
value: ${{ steps.generate_secret.outputs.value }}
```## References
- https://docs.github.com/en/rest/reference/actions#secrets
- https://github.com/github/tweetsodium## Similar actions
- https://github.com/hmanzur/actions-set-secret
- https://github.com/jon-grey/github-actions-secrets-creator## License
MIT