Skip to content
Draft
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
42 changes: 42 additions & 0 deletions .github/workflows/tf-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: reviewdog
on: [pull_request]
jobs:
tflint:
name: runner / tflint
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@master

# Install latest Terraform manually as
# Docker-based GitHub Actions are
# slow due to lack of caching
# Note: Terraform is not needed for tflint
# - name: Install Terraform
# run: |
# brew install terraform

# Run init to get module code to be able to use `--module`
- name: Terraform init
run: |
terraform init

# Minimal example
- name: tflint
uses: reviewdog/action-tflint@master
with:
github_token: ${{ secrets.github_token }}

# More complex example
- name: tflint
uses: reviewdog/action-tflint@master
with:
github_token: ${{ secrets.github_token }}
# working_directory: "testdata" # Optional. Change working directory
# reporter: github-pr-review # Optional. Change reporter
fail_on_error: "true" # Optional. Fail action if errors are found
# filter_mode: "nofilter" # Optional. Check all files, not just the diff
tflint_version: "v0.24.0" # Optional. Custom version, instead of latest
# tflint_rulesets: "azurerm google" # Optional. Extra official rulesets to install
flags: "--module" # Optional. Add custom tflint flags