Skip to content

Commit 20506a6

Browse files
committed
docs: 📚️ action options
1 parent 3283c11 commit 20506a6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This GitHub Action can be used to impersonate a GitHub App when `secrets.GITHUB_
44

55
[`secrets.GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) has limitations such as [not being able to triggering a new workflow from another workflow](https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676). A workaround is to use a [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) from a [personal user/bot account](https://help.github.com/en/github/getting-started-with-github/types-of-github-accounts#personal-user-accounts). However, for organizations, GitHub Apps are [a more appropriate automation solution](https://developer.github.com/apps/differences-between-apps/#machine-vs-bot-accounts).
66

7-
# Example Workflow
7+
## Example Workflow
88

99
```yml
1010
jobs:
@@ -23,3 +23,15 @@ jobs:
2323
run: |
2424
echo "The generated token is masked: ${TOKEN}"
2525
```
26+
27+
### Options
28+
29+
- `APP_ID`: The ID of the GitHub App.
30+
- `PRIVATE_KEY`: The private key of the GitHub App (can be Base64 encoded).
31+
- `VARIABLE_NAME`: The name of generated token in exported variable. Specify a varable name will set an environment variable with specfiied name and valued with generated token, and can be use in next step with `${ VARIABLE_NAME }`.
32+
- `SECRET_NAME`: The secret name created on current repository. Specify a secret name will add an secret on current repository with specfiied name and valued with generated token and can be use in next step with `${{ secrets.SECRET_NAME }}`.
33+
- `CLEAN_SECRET`: Shoule clean the secret or not when the job completed. Only used when `SECRET_NAME` specfiied. Default `false`.
34+
35+
## License
36+
37+
The scripts and documentation in this project are released under the [MIT License](LICENSE)

0 commit comments

Comments
 (0)