Skip to content

Commit 3d9aac6

Browse files
committed
ci: update workflow files
1 parent 49dae84 commit 3d9aac6

File tree

2 files changed

+40
-45
lines changed

2 files changed

+40
-45
lines changed
Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Terraform Docs & Checks
1+
name: Terraform Checks
22

33
on:
44
push:
@@ -11,55 +11,17 @@ on:
1111
- master
1212

1313
env:
14-
TERRAFORM_DOCS_VERSION: v0.18.0
1514
TFLINT_VERSION: v0.50.3
15+
TERRAFORM_VERSION: 1.8.4
1616

1717
jobs:
18-
generateDocs:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v4
23-
with:
24-
ref: ${{ github.event.pull_request.head.ref }}
25-
26-
- name: Render and Push terraform docs for main and modules
27-
uses: terraform-docs/gh-actions@main
28-
with:
29-
working-dir: .
30-
git-push: true
31-
config-file: .terraform-docs.yaml
32-
33-
- name: Render and Push terraform docs for examples
34-
uses: terraform-docs/gh-actions@main
35-
with:
36-
working-dir: .
37-
git-push: true
38-
config-file: .terraform-docs-example.yaml
39-
40-
collectInputs:
41-
name: Collect workflow inputs
42-
needs: generateDocs
43-
runs-on: ubuntu-latest
44-
outputs:
45-
directories: ${{ steps.dirs.outputs.directories }}
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v4
49-
50-
- name: Get root directories
51-
id: dirs
52-
uses: clowdhaus/terraform-composite-actions/directories@v1.9.0
53-
5418
preCommitMinVersions:
5519
name: Min TF pre-commit
56-
needs: collectInputs
5720
runs-on: ubuntu-latest
5821
strategy:
5922
matrix:
60-
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
23+
directory: ${{ fromJson(needs.setupAndTest.outputs.directories) }}
6124
steps:
62-
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
6325
- name: Delete huge unnecessary tools folder
6426
run: |
6527
rm -rf /opt/hostedtoolcache/CodeQL
@@ -77,7 +39,6 @@ jobs:
7739
directory: ${{ matrix.directory }}
7840

7941
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
80-
# Run only validate pre-commit check on min version supported
8142
if: ${{ matrix.directory != '.' }}
8243
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
8344
with:
@@ -86,7 +47,6 @@ jobs:
8647
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
8748

8849
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
89-
# Run only validate pre-commit check on min version supported
9050
if: ${{ matrix.directory == '.' }}
9151
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
9252
with:
@@ -97,9 +57,7 @@ jobs:
9757
preCommitMaxVersion:
9858
name: Max TF pre-commit
9959
runs-on: ubuntu-latest
100-
needs: collectInputs
10160
steps:
102-
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
10361
- name: Delete huge unnecessary tools folder
10462
run: |
10563
rm -rf /opt/hostedtoolcache/CodeQL
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Terraform Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
branches:
10+
- main
11+
- master
12+
13+
env:
14+
TERRAFORM_DOCS_VERSION: v0.18.0
15+
16+
jobs:
17+
generateDocs:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.event.pull_request.head.ref }}
24+
25+
- name: Render and Push terraform docs for main and modules
26+
uses: terraform-docs/gh-actions@main
27+
with:
28+
working-dir: .
29+
git-push: true
30+
config-file: .terraform-docs.yaml
31+
32+
- name: Render and Push terraform docs for examples
33+
uses: terraform-docs/gh-actions@main
34+
with:
35+
working-dir: .
36+
git-push: true
37+
config-file: .terraform-docs-example.yaml

0 commit comments

Comments
 (0)