docs: Added bagde. #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Terraform code | |
on: | |
push: | |
paths: | |
- '**.tf' | |
jobs: | |
check-terraform: | |
name: Check Terraform code | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: "1.6.2" | |
- name: Initialize Terraform | |
run: terraform init | |
- name: Validate Terraform configuration | |
run: terraform validate | |
- name: Format Terraform code | |
run: terraform fmt -recursive | |
- name: Check code with tfsec | |
uses: aquasecurity/tfsec-action@v1.0.0 |