https://github.com/suzuki-shunsuke/github-action-tflint
GitHub Actions for tflint
https://github.com/suzuki-shunsuke/github-action-tflint
Last synced: about 1 month ago
JSON representation
GitHub Actions for tflint
- Host: GitHub
- URL: https://github.com/suzuki-shunsuke/github-action-tflint
- Owner: suzuki-shunsuke
- License: mit
- Created: 2021-10-11T07:05:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T01:27:45.000Z (about 1 month ago)
- Last Synced: 2025-03-31T02:27:26.194Z (about 1 month ago)
- Language: TypeScript
- Size: 1.62 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-action-tflint
GitHub Actions for [tflint](https://github.com/terraform-linters/tflint).
Run tflint and notify the result with [reviewdog](https://github.com/reviewdog/reviewdog) and [github-comment](https://github.com/suzuki-shunsuke/github-comment).
This GitHub Actions does **not** install tflint and reviewdog, so you have to install them in advance.
It allows to install tools outside this action.
We recommend [aqua](https://aquaproj.github.io/) to install them.## Motivation
We know there are other GitHub Actions for tflint.
They install tflint automatically, but we would like to manage tools with [aqua](https://aquaproj.github.io/), which is a declarative CLI Version Manager written in Go.
By aqua, you can update tools continuously with Renovate very easily and use the same tool versions in both CI and your development environment.
This GitHub Actions does **not** install tflint, so we can install them outside this action.## Requirements
* [tflint](https://github.com/terraform-linters/tflint) >= [v0.50.0](https://github.com/terraform-linters/tflint/releases/tag/v0.50.0)
* [reviewdog](https://github.com/reviewdog/reviewdog)
* (Optional) [github-comment](https://github.com/suzuki-shunsuke/github-comment)## Notification with reviewdog
## Notification with github-comment
```yaml
- uses: suzuki-shunsuke/github-action-tflint@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: tests
github_comment: true # Enable github-comment notification
```:bulb: If you want to hide old notification, please use [github-comment hide command](https://github.com/suzuki-shunsuke/github-comment#hide).
## Example
```yaml
- uses: suzuki-shunsuke/[email protected]
``````yaml
- uses: suzuki-shunsuke/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token_for_tflint_init: ${{ secrets.GH_TOKEN_FOR_TFLINT_INIT }}
working_directory: foo
github_comment: true
```## Inputs
### Required Inputs
Nothing.
### Optional Inputs
name | default value | description
--- | --- | ---
github_token | `github.token` | GitHub Access Token
github_token_for_tflint_init | `github_token` | GitHub Access Token for `tflint --init`. It this isn't set, the input `github_token` is used. This input is useful for a GitHub Enterprise Server
working_directory | "" (current directory) | Woring Directory
github_comment | `false` | Whether a comment is posted with github-comment## Outputs
Nothing.
## License
[MIT](LICENSE)