https://github.com/action-pack/set-secret
Action to set a repository secret.
https://github.com/action-pack/set-secret
action github github-action github-actions secret
Last synced: about 1 year ago
JSON representation
Action to set a repository secret.
- Host: GitHub
- URL: https://github.com/action-pack/set-secret
- Owner: action-pack
- License: mit
- Created: 2023-04-30T00:26:36.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-12T23:32:34.000Z (about 1 year ago)
- Last Synced: 2025-03-20T02:15:36.490Z (about 1 year ago)
- Topics: action, github, github-action, github-actions, secret
- Language: JavaScript
- Homepage:
- Size: 1.43 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
Set Secret
[](https://github.com/action-pack/set-secret/)
[](https://github.com/marketplace/actions/set-secret)
[](https://github.com/action-pack/set-secret/)
Action to set a repository secret.
## Usage 🚀
```yaml
uses: action-pack/set-secret@v1
with:
name: 'MY_SECRET'
value: 'Lorem ipsun dolor simit'
token: ${{ secrets.REPO_ACCESS_TOKEN }}
```
## 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)
### owner
**Optional** `String` Owners name.
### repository
**Optional** `String` Repository name.
### org
**Optional** `Boolean` Indicates the repo is an [organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-organizations).
### visibility
**Optional** `String` The visibility of the secret in organizations. Can be `all`, `private`, or `selected`, Defaults to `all`.
## FAQ 💬
* ### Why do I get the error '*Resource not accessible by integration*'?
This will happen if you use ```secrets.GITHUB_TOKEN```.
You need to create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) instead.
Go to your Github settings, select 'Developer settings' --> 'Personal access tokens' --> 'Tokens (classic)' and create a new token. Store its value in a secret, for example ```MY_TOKEN```.
Then refer to it like this:
```yaml
token: ${{ secrets.MY_TOKEN }}
```
## Stars 🌟
[](https://starchart.cc/action-pack/set-secret)