-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbd9bb9
commit 3a717e3
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Tests: Pre-commit" | ||
name: "Tests: Pre-Commit" | ||
|
||
on: | ||
pull_request: | ||
|
@@ -10,7 +10,7 @@ env: | |
TFLINT_VERSION: v0.50.3 | ||
|
||
jobs: | ||
collect-inputs: | ||
collectInputs: | ||
name: Collect workflow inputs | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -23,13 +23,13 @@ jobs: | |
id: dirs | ||
uses: clowdhaus/terraform-composite-actions/[email protected] | ||
|
||
precommit-min-versions: | ||
preCommitMinVersions: | ||
name: Min TF pre-commit | ||
needs: collect-inputs | ||
needs: collectInputs | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
directory: ${{ fromJson(needs.collect-inputs.outputs.directories) }} | ||
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }} | ||
steps: | ||
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 | ||
- name: Delete huge unnecessary tools folder | ||
|
@@ -43,33 +43,33 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Terraform min/max versions | ||
id: min-max | ||
id: minMax | ||
uses: clowdhaus/[email protected] | ||
with: | ||
directory: ${{ matrix.directory }} | ||
|
||
- name: Pre-commit Terraform ${{ steps.min-max.outputs.min-version }} | ||
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} | ||
# Run only validate pre-commit check on min version supported | ||
if: ${{ matrix.directory != '.' }} | ||
uses: clowdhaus/terraform-composite-actions/[email protected] | ||
with: | ||
terraform-version: ${{ steps.min-max.outputs.min-version }} | ||
terraform-version: ${{ steps.minMax.outputs.minVersion }} | ||
tflint-version: ${{ env.TFLINT_VERSION }} | ||
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*' | ||
|
||
- name: Pre-commit Terraform ${{ steps.min-max.outputs.min-version }} | ||
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} | ||
# Run only validate pre-commit check on min version supported | ||
if: ${{ matrix.directory == '.' }} | ||
uses: clowdhaus/terraform-composite-actions/[email protected] | ||
with: | ||
terraform-version: ${{ steps.min-max.outputs.min-version }} | ||
terraform-version: ${{ steps.minMax.outputs.minVersion }} | ||
tflint-version: ${{ env.TFLINT_VERSION }} | ||
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)' | ||
|
||
precommit-max-versions: | ||
preCommitMaxVersion: | ||
name: Max TF pre-commit | ||
runs-on: ubuntu-latest | ||
needs: collect-inputs | ||
needs: collectInputs | ||
steps: | ||
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 | ||
- name: Delete huge unnecessary tools folder | ||
|
@@ -86,13 +86,13 @@ jobs: | |
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
|
||
- name: Terraform min/max versions | ||
id: min-max | ||
id: minMax | ||
uses: clowdhaus/[email protected] | ||
|
||
- name: Pre-commit Terraform ${{ steps.min-max.outputs.max-version }} | ||
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }} | ||
uses: clowdhaus/terraform-composite-actions/[email protected] | ||
with: | ||
terraform-version: ${{ steps.min-max.outputs.max-version }} | ||
terraform-version: ${{ steps.minMax.outputs.maxVersion }} | ||
tflint-version: ${{ env.TFLINT_VERSION }} | ||
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }} | ||
install-hcledit: true |