Bump hashicorp/setup-terraform from 2 to 3 #32
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: Validate Terraform module | |
on: | |
push: | |
branches-ignore: | |
- "main" | |
jobs: | |
validate: | |
name: Validate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Set up Terraform cli | |
uses: hashicorp/setup-terraform@v3 | |
- name: Terraform fmt | |
run: | | |
set +e | |
terraform fmt -check | |
if [[ $? -ne 0 ]]; then | |
echo "Be sure to run 'terraform fmt' before committing. This can usually be done in your IDE of choice" | |
exit 1 | |
fi | |
set -e | |
- name: TF init | |
run: terraform init -input=false -backend=false | |
- name: TF validate | |
run: terraform validate |