Skip to content

Merge pull request #6 from rabiloo/dependabot/github_actions/actions/… #18

Merge pull request #6 from rabiloo/dependabot/github_actions/actions/…

Merge pull request #6 from rabiloo/dependabot/github_actions/actions/… #18

name: Run validation
on:
- push
jobs:
validation:
name: Run terraform validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
- 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