Skip to content

Commit

Permalink
Merge pull request #21 from babbel/suggest-format-changes
Browse files Browse the repository at this point in the history
Check formatting, make suggestions in PRs
  • Loading branch information
awendt authored Dec 19, 2024
2 parents b631fac + f07b06f commit 2a22229
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/tf-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Post comments about TF syntax

on: pull_request

jobs:
post-format-comment:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.6.6
- name: Terraform Format
run: terraform fmt -recursive
- name: Suggest format changes
uses: reviewdog/action-suggester@v1
with:
tool_name: terraform fmt
level: error
1 change: 1 addition & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform_version }}
- run: terraform fmt -diff -check -recursive
- run: terraform init
- run: terraform validate

Expand Down

0 comments on commit 2a22229

Please sign in to comment.