@@ -49,19 +49,29 @@ jobs:
49
49
- name : Initialize Terraform
50
50
run : terraform init -get -backend=false -input=false
51
51
- name : Check Terraform formatting
52
- run : terraform fmt -check=true -write=false
52
+ run : terraform fmt -recursive -check=true -write=false
53
+ - name : Reviewdog suggester (Terraform fmt)
54
+ uses : reviewdog/action-suggester@v1
55
+ with :
56
+ tool_name : " terraform fmt -recursive"
53
57
- name : Validate Terraform
54
58
run : terraform validate
55
59
- uses : actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
56
60
name : Cache TFLint plugin dir
57
61
with :
58
62
path : ~/.tflint.d/plugins
59
63
key : tflint-${{ hashFiles('.tflint.hcl') }}
60
- - name : Setup TFLint
61
- uses : terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
64
+ # - name: Setup TFLint
65
+ # uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
66
+ # with:
67
+ # github_token: ${{ secrets.GITHUB_TOKEN }}
68
+ # - name: Run TFLint
69
+ # run: |
70
+ # tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl
71
+ # tflint -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars ${{ inputs.tflint-options }}
72
+ - name : tflint
73
+
62
74
with :
63
- github_token : ${{ secrets.GITHUB_TOKEN }}
64
- - name : Run TFLint
65
- run : |
66
- tflint --init -c ${GITHUB_WORKSPACE}/.tflint.hcl
67
- tflint -c ${GITHUB_WORKSPACE}/.tflint.hcl --var-file ${GITHUB_WORKSPACE}/.github/lint/tflint.tfvars ${{ inputs.tflint-options }}
75
+ tflint_init : true
76
+ github_token : ${{ secrets.github_token }}
77
+ tflint_config : ${GITHUB_WORKSPACE}/.tflint.hcl
0 commit comments