File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 7
7
TF_WORKSPACE : " production"
8
8
CONFIG_DIRECTORY : " ./"
9
9
jobs :
10
+ tflint :
11
+ runs-on : ${{ matrix.os }}
12
+
13
+ strategy :
14
+ matrix :
15
+ os : [ubuntu-latest, macos-latest, windows-latest]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ name : Checkout source code
20
+
21
+ - uses : actions/cache@v4
22
+ name : Cache plugin dir
23
+ with :
24
+ path : ~/.tflint.d/plugins
25
+ key : ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
26
+
27
+ - uses : terraform-linters/setup-tflint@v4
28
+ name : Setup TFLint
29
+ with :
30
+ tflint_version : v0.52.0
31
+ - name : Show version
32
+ run : tflint --version
33
+
34
+ - name : Init TFLint
35
+ run : tflint --init
36
+ env :
37
+ # https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
38
+ GITHUB_TOKEN : ${{ github.token }}
39
+
40
+ - name : Run TFLint
41
+ run : tflint -f compact
10
42
terraform :
11
43
if : github.repository != 'hashicorp-education/learn-terraform-github-actions'
12
44
name : " Terraform Plan"
You can’t perform that action at this time.
0 commit comments