@@ -83,21 +83,22 @@ jobs:
8383 - name : Determine TFLint config file location
8484 if : success() || failure()
8585 run : |
86- echo "TFLINT_CONFIG_FILE=${{ github.workspace }}/${{ inputs.terraform_directory }}/.tflint.hcl" >> "$GITHUB_ENV"
86+ echo "TFLINT_CONFIG_FILE_ABS=${{ github.workspace }}/${{ inputs.terraform_directory }}/.tflint.hcl" >> "$GITHUB_ENV"
87+ echo "TFLINT_CONFIG_FILE_REL=${{ inputs.terraform_directory }}/.tflint.hcl" >> "$GITHUB_ENV"
8788
8889 - name : Cache plugin dir
8990 uses : actions/cache@v4
9091 if : success() || failure()
9192 with :
9293 path : ~/.tflint.d/plugins
93- key : tflint-${{ hashFiles(env.TFLINT_CONFIG_FILE ) }}
94+ key : tflint-${{ hashFiles(env.TFLINT_CONFIG_FILE_REL ) }}
9495
9596 - name : Setup TFLint
9697 uses : terraform-linters/setup-tflint@v4
9798 if : success() || failure()
9899
99100 - name : Init TFLint
100- run : tflint --init --config="$TFLINT_CONFIG_FILE "
101+ run : tflint --init --config="$TFLINT_CONFIG_FILE_ABS "
101102 if : success() || failure()
102103 env :
103104 GITHUB_TOKEN : ${{ github.token }}
@@ -106,7 +107,7 @@ jobs:
106107 if : ${{ github.event_name != 'pull_request' && (success() || failure()) }}
107108 run : |
108109 set +e
109- TFLINT_OUTPUT=$(tflint --recursive --config="$TFLINT_CONFIG_FILE ")
110+ TFLINT_OUTPUT=$(tflint --recursive --config="$TFLINT_CONFIG_FILE_ABS ")
110111 EXITCODE=$?
111112 {
112113 echo '<details><summary>TFLint Output</summary>'
@@ -120,7 +121,7 @@ jobs:
120121 - name : Run TFLint (PR)
121122 if : ${{ github.event_name == 'pull_request' && (success() || failure()) }}
122123 run : |
123- tflint --format=checkstyle --recursive --config="$TFLINT_CONFIG_FILE " > ${{ github.workspace }}/tflint-report.xml
124+ tflint --format=checkstyle --recursive --config="$TFLINT_CONFIG_FILE_ABS " > ${{ github.workspace }}/tflint-report.xml
124125
125126 - name : Report Result
126127 uses : jwgmeligmeyling/checkstyle-github-action@master
0 commit comments