Configure Renovate #7
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: Terraform | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
terraform: | |
name: Terraform | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
directory: [".", "./example"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v1 | |
with: | |
terraform_version: ">= 0.13" | |
- name: Init Terraform | |
run: terraform init | |
working-directory: ${{ matrix.directory }} | |
- name: Validate Terraform configurations | |
run: terraform validate | |
working-directory: ${{ matrix.directory }} | |
- name: Validate Terraform configuration files formatting | |
run: if ! terraform fmt -list=false -check; then echo "Some terraform files need be formatted, run 'terraform fmt' to fix"; exit 1; fi | |
working-directory: ${{ matrix.directory }} |