|
7 | 7 | - master |
8 | 8 |
|
9 | 9 | jobs: |
10 | | -# Min Terraform version(s) |
| 10 | + # Min Terraform version(s) |
11 | 11 | getDirectories: |
12 | | - name: Get root directories |
13 | | - runs-on: ubuntu-latest |
14 | | - steps: |
15 | | - - name: Checkout |
16 | | - uses: actions/checkout@v2 |
17 | | - - name: Install Python |
18 | | - uses: actions/setup-python@v2 |
19 | | - - name: Build matrix |
20 | | - id: matrix |
21 | | - run: | |
22 | | - DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))") |
23 | | - echo "::set-output name=directories::$DIRS" |
24 | | - outputs: |
25 | | - directories: ${{ steps.matrix.outputs.directories }} |
| 12 | + name: Get root directories |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
| 17 | + - name: Install Python |
| 18 | + uses: actions/setup-python@v2 |
| 19 | + - name: Build matrix |
| 20 | + id: matrix |
| 21 | + run: | |
| 22 | + DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))") |
| 23 | + echo "::set-output name=directories::$DIRS" |
| 24 | + outputs: |
| 25 | + directories: ${{ steps.matrix.outputs.directories }} |
26 | 26 |
|
27 | 27 | preCommitMinVersions: |
28 | 28 | name: Min TF validate |
29 | 29 | needs: getDirectories |
30 | 30 | runs-on: ubuntu-latest |
31 | 31 | strategy: |
32 | | - matrix: |
33 | | - directory: ${{ fromJson(needs.getDirectories.outputs.directories) }} |
| 32 | + matrix: |
| 33 | + directory: ${{ fromJson(needs.getDirectories.outputs.directories) }} |
34 | 34 | steps: |
35 | 35 | - name: Checkout |
36 | 36 | uses: actions/checkout@v2 |
|
59 | 59 | pre-commit run terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf) |
60 | 60 |
|
61 | 61 |
|
62 | | -# Max Terraform version |
| 62 | + # Max Terraform version |
63 | 63 | getBaseVersion: |
64 | 64 | name: Module max TF version |
65 | 65 | runs-on: ubuntu-latest |
|
94 | 94 | - name: Install pre-commit dependencies |
95 | 95 | run: | |
96 | 96 | pip install pre-commit |
97 | | - curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12.0-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ |
| 97 | + curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12\..+?-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ |
98 | 98 | curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ |
99 | 99 | - name: Execute pre-commit |
100 | 100 | # Run all pre-commit checks on max version supported |
|
0 commit comments