|
11 | 11 | - master |
12 | 12 |
|
13 | 13 | env: |
14 | | - TFLINT_VERSION: v0.50.3 |
15 | | - TERRAFORM_VERSION: 1.8.4 |
| 14 | + TERRAFORM_DOCS_VERSION: v0.18.0 |
| 15 | + TFLINT_VERSION: v0.52.0 |
16 | 16 |
|
17 | 17 | jobs: |
| 18 | + collectInputs: |
| 19 | + name: Collect workflow inputs |
| 20 | + runs-on: ubuntu-latest |
| 21 | + outputs: |
| 22 | + directories: ${{ steps.dirs.outputs.directories }} |
| 23 | + steps: |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Get root directories |
| 28 | + id: dirs |
| 29 | + uses: clowdhaus/terraform-composite-actions/directories@v1.9.0 |
| 30 | + |
18 | 31 | preCommitMinVersions: |
19 | 32 | name: Min TF pre-commit |
| 33 | + needs: collectInputs |
20 | 34 | runs-on: ubuntu-latest |
21 | 35 | strategy: |
22 | 36 | matrix: |
23 | | - directory: ${{ fromJson(needs.setupAndTest.outputs.directories) }} |
| 37 | + directory: ${{ fromJson(needs.collectInputs.outputs.directories) }} |
24 | 38 | steps: |
| 39 | + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 |
25 | 40 | - name: Delete huge unnecessary tools folder |
26 | 41 | run: | |
27 | 42 | rm -rf /opt/hostedtoolcache/CodeQL |
|
39 | 54 | directory: ${{ matrix.directory }} |
40 | 55 |
|
41 | 56 | - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} |
| 57 | + # Run only validate pre-commit check on min version supported |
42 | 58 | if: ${{ matrix.directory != '.' }} |
43 | 59 | uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 |
44 | 60 | with: |
|
47 | 63 | args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*' |
48 | 64 |
|
49 | 65 | - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} |
| 66 | + # Run only validate pre-commit check on min version supported |
50 | 67 | if: ${{ matrix.directory == '.' }} |
51 | 68 | uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 |
52 | 69 | with: |
|
57 | 74 | preCommitMaxVersion: |
58 | 75 | name: Max TF pre-commit |
59 | 76 | runs-on: ubuntu-latest |
| 77 | + needs: collectInputs |
60 | 78 | steps: |
| 79 | + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 |
61 | 80 | - name: Delete huge unnecessary tools folder |
62 | 81 | run: | |
63 | 82 | rm -rf /opt/hostedtoolcache/CodeQL |
|
0 commit comments