Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check formatting, make suggestions in PRs #35

Merged
merged 2 commits into from
Dec 19, 2024
Merged
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
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