Skip to content

Commit

Permalink
Merge pull request #10 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 be4f8ec + 8dd64eb commit 9ac99e5
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 @@ -20,6 +20,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 9ac99e5

Please sign in to comment.