16
16
name : Verify module
17
17
strategy :
18
18
matrix :
19
- terraform : [1.5.6, "latest"]
19
+ terraform : [" 1.5.6" , "latest"]
20
20
runs-on : ubuntu-latest
21
21
container :
22
22
image : hashicorp/terraform:${{ matrix.terraform }}
53
53
run : apk add --no-cache tar
54
54
continue-on-error : true
55
55
- if : contains(matrix.terraform, '1.5.')
56
- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
56
+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
57
57
name : Cache TFLint plugin dir
58
58
with :
59
59
path : ~/.tflint.d/plugins
74
74
strategy :
75
75
fail-fast : false
76
76
matrix :
77
- terraform : [1.5.6, "latest"]
77
+ terraform : [" 1.5.6" , "latest"]
78
78
module :
79
79
[
80
80
" ami-housekeeper" ,
@@ -119,7 +119,7 @@ jobs:
119
119
run : apk add --no-cache tar
120
120
continue-on-error : true
121
121
- if : contains(matrix.terraform, '1.3.')
122
- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
122
+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
123
123
name : Cache TFLint plugin dir
124
124
with :
125
125
path : ~/.tflint.d/plugins
@@ -132,16 +132,18 @@ jobs:
132
132
- if : contains(matrix.terraform, '1.3.')
133
133
name : Run TFLint
134
134
working-directory : ${{ github.workspace }}
135
+ env :
136
+ MODULE_NAME : ${{ matrix.module }}
135
137
run : |
136
- tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl --chdir modules/${{ matrix.module }}
137
- tflint -f compact -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars --chdir modules/${{ matrix.module }}
138
+ tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl --chdir " modules/${MODULE_NAME}"
139
+ tflint -f compact -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars --chdir " modules/${MODULE_NAME}"
138
140
139
141
verify_examples :
140
142
name : Verify examples
141
143
strategy :
142
144
fail-fast : false
143
145
matrix :
144
- terraform : [1.5.6, "latest"]
146
+ terraform : [" 1.5.6" , "latest"]
145
147
example :
146
148
[
147
149
" default" ,
@@ -182,7 +184,7 @@ jobs:
182
184
run : apk add --no-cache tar
183
185
continue-on-error : true
184
186
- if : contains(matrix.terraform, '1.5.')
185
- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
187
+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
186
188
name : Cache TFLint plugin dir
187
189
with :
188
190
path : ~/.tflint.d/plugins
@@ -195,6 +197,8 @@ jobs:
195
197
- if : contains(matrix.terraform, '1.5.')
196
198
name : Run TFLint
197
199
working-directory : ${{ github.workspace }}
200
+ env :
201
+ EXAMPLE_NAME : ${{ matrix.example }}
198
202
run : |
199
- tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl --chdir modules /${{ matrix.module }}
200
- tflint -f compact -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars --chdir examples/${{ matrix.example }}
203
+ tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl --chdir "examples /${EXAMPLE_NAME}"
204
+ tflint -f compact -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars --chdir " examples/${EXAMPLE_NAME}"
0 commit comments