Skip to content

Commit

Permalink
Set default GitHub token (#89)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Drucker <bvdrucker@gmail.com>
  • Loading branch information
laughedelic and bendrucker authored Nov 17, 2022
1 parent 0545464 commit ba6bb29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Default: `"latest"`

### `github_token`

If set, `github_token` will be used for Octokit authentication. Authenticating will increase the [API rate limit](https://developer.github.com/v3/#rate-limiting) when querying the tflint repository to get the latest release version.
Used to authenticate requests to the GitHub API to obtain release data from the TFLint repository. Authenticating will increase the [API rate limit](https://developer.github.com/v3/#rate-limiting). Any valid token is supported. No permissions are required.

Default: `${{ github.token }}`

## Outputs

Expand Down Expand Up @@ -75,12 +77,12 @@ or specify it explicitly as
tflint_version: latest
```
### Using `GITHUB_TOKEN`
### Using Custom GitHub Token
```yaml
- uses: terraform-linters/setup-tflint@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.MY_CUSTOM_GITHUB_TOKEN }}
```
### Loading Shared Configuration
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ inputs:
github_token:
description: GitHub token - used when getting the latest version of tflint
required: false
default: ${{ github.token }}
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down

0 comments on commit ba6bb29

Please sign in to comment.