mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 07:25:43 +08:00
feat(action): allow configuring the github token and set it when it exists (#34)
* fix: set Bearer token in curl request when GITHUB_TOKEN is set Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> * fix: use a dedicated input variable to pass github token Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> * fix: use github_token inputs Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> * Update README.md * Update README.md --------- Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ This action generates a changelog based on your Git history using [git-cliff](ht
|
||||
- `version`: `git-cliff` version to use. (e.g. `"latest"`, `"v2.5.0"`)
|
||||
- `config`: Path of the configuration file. (Default: `"cliff.toml"`)
|
||||
- `args`: [Arguments](https://github.com/orhun/git-cliff#usage) to pass to git-cliff. (Default: `"-v"`)
|
||||
- `github_token`: The GitHub API token used to get `git-cliff` release information via the GitHub API to avoid rate limits. (Default: `${{ github.token }}`)
|
||||
|
||||
### Output variables
|
||||
|
||||
@@ -32,6 +33,13 @@ This action generates a changelog based on your Git history using [git-cliff](ht
|
||||
>
|
||||
> Otherwise, you might end up getting empty changelogs or `git ref` errors depending on arguments passed to `git-cliff`.
|
||||
|
||||
### Running the action outside of GitHub
|
||||
|
||||
If you run the action in Gitea or GitHub Enterprise, the `github_token` input is invalid. You have two options:
|
||||
|
||||
- Pass an empty value (`github_token: ""`) (limit of 60 requests per hour per IP address).
|
||||
- Create a GitHub token and pass it through GitHub secrets to avoid rate limiting.
|
||||
|
||||
### Examples
|
||||
|
||||
#### Simple
|
||||
|
||||
Reference in New Issue
Block a user