deployments/.github/workflows/lint.yml

27 lines
523 B
YAML

name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
terraform:
name: Terraform format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.0
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3.1.2
- name: Terraform Format
run: |
for folder in $(find . -type f -name "*.tf" -exec dirname "{}" \; | sort -u); do
terraform "-chdir=${folder}" fmt -check
done