Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ Optional. List of arguments to send to `tflint`.
For the output to be parsable by reviewdog [`--format=checkstyle` is enforced](./entrypoint.sh).
The default is `--call-module-type=all`.

### `reviewdog_github_api_token`

Optional. The value of REVIEWDOG_GITHUB_API_TOKEN environment variable.
If value is empty string, use `github_token` value.
The default is `''`.

## Outputs

## `tflint-return-code`
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ inputs:
For the output to be parsable by reviewdog --format=checkstyle is enforced
Default is --call-module-type=all.
default: '--call-module-type=all'
reviewdog_github_api_token:
description: 'REVIEWDOG_GITHUB_API_TOKEN'
default: ''

outputs:
tflint-return-code:
Expand Down Expand Up @@ -104,6 +107,7 @@ runs:
INPUT_TFLINT_TARGET_DIR: ${{ inputs.tflint_target_dir }}
INPUT_TFLINT_CONFIG: ${{ inputs.tflint_config }}
INPUT_FLAGS: ${{ inputs.flags }}
INPUT_REVIEWDOG_GITHUB_API_TOKEN: ${{ inputs.reviewdog_github_api_token }}

branding:
icon: 'edit'
Expand Down
2 changes: 1 addition & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ echo '::endgroup::'


echo '::group:: Running tflint with reviewdog 🐶 ...'
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_REVIEWDOG_GITHUB_API_TOKEN:-${INPUT_GITHUB_TOKEN}}"

# Allow failures now, as reviewdog handles them
set +Eeuo pipefail
Expand Down