Bump hashicorp/setup-terraform from 2 to 3 #24
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: Run validation | |
on: | |
- push | |
jobs: | |
validation: | |
name: Run terraform validate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Show Terraform version | |
run: terraform --version | |
- name: Cache plugin dir | |
uses: actions/cache@v3 | |
with: | |
path: ~/.terraform | |
key: terraform-${{ hashFiles('versions.tf') }} | |
- name: Init Terraform | |
run: terraform init -upgrade | |
- name: Run Terraform validate | |
run: | | |
terraform fmt --check | |
terraform validate |