Fix/bump #64
Workflow file for this run
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: static-checks | |
on: | |
pull_request: | |
jobs: | |
versionExtract: | |
name: Get min/max versions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Terraform min/max versions | |
id: minMax | |
uses: clowdhaus/terraform-min-max@main | |
outputs: | |
minVersion: ${{ steps.minMax.outputs.minVersion }} | |
maxVersion: ${{ steps.minMax.outputs.maxVersion }} | |
versionEvaluate: | |
name: Evaluate Terraform versions | |
runs-on: ubuntu-latest | |
needs: versionExtract | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- ${{ needs.versionExtract.outputs.minVersion }} | |
- ${{ needs.versionExtract.outputs.maxVersion }} | |
directory: | |
- _example/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Terraform v${{ matrix.version }} | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ matrix.version }} | |
- name: Init & validate v${{ matrix.version }} | |
run: | | |
cd ${{ matrix.directory }} | |
terraform init | |
terraform validate | |
- name: tflint | |
uses: reviewdog/action-tflint@master | |
with: | |
tflint_version: v0.29.0 | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
working_directory: ${{ matrix.directory }} | |
fail_on_error: 'true' | |
filter_mode: 'nofilter' | |
flags: '--module' | |
format: | |
name: Check code format | |
runs-on: ubuntu-latest | |
needs: versionExtract | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Terraform v${{ needs.versionExtract.outputs.maxVersion }} | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ needs.versionExtract.outputs.maxVersion }} | |
- name: Check Terraform format changes | |
run: terraform fmt --recursive -check=true |