Skip to content

Commit

Permalink
ci: use github token by default
Browse files Browse the repository at this point in the history
Set `${{ github.token }}` as the default value for `github_token` input.
This is the common practice, examples:

* https://github.com/actions/checkout/blob/main/action.yml#L24
* astral-sh/setup-uv#61
  • Loading branch information
nikaro committed Sep 22, 2024
1 parent 1f11eb2 commit 82113b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
token: "${{ secrets.GITHUB_TOKEN }}"
- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
```
Expand All @@ -66,7 +63,7 @@ jobs:
| Name | Description | Default |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `github_token` | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`. Required if `push: true` | - |
| `github_token` | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}` if your want to use a custom PAT | `${{ github.token }}` |
| `dry_run` | Run without creating commit, output to stdout | false |
| `repository` | Repository name to push. Default or empty value represents current github repository | current one |
| `branch` | Destination branch to push changes | Same as the one executing the action by default |
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ inputs:
github_token:
description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}'
required: false
default: ${{ github.token }}
repository:
description: 'Repository name to push. Default or empty value represents current github repository (${GITHUB_REPOSITORY})'
default: ''
Expand Down

0 comments on commit 82113b9

Please sign in to comment.