You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-6Lines changed: 51 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,26 @@ Installs a wrapper script to wrap subsequent calls to `tflint` and expose `stdou
37
37
38
38
Default: `"false"`
39
39
40
+
### `cache`
41
+
42
+
Enable caching of TFLint plugins. When enabled, the action will cache the plugin directory and restore it on subsequent runs based on the hash of your TFLint configuration file(s).
43
+
44
+
Default: `"false"`
45
+
46
+
### `tflint_config_path`
47
+
48
+
Glob pattern for TFLint configuration file(s) used to generate the cache key. All matching files will be hashed together to determine cache validity. Supports glob patterns for monorepo setups.
49
+
50
+
Default: `".tflint.hcl"`
51
+
52
+
### `plugin_dir`
53
+
54
+
Directory where TFLint plugins are installed. See [TFLint plugin configuration](https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md#plugin-directory) for details.
55
+
56
+
Can also be set via `TFLINT_PLUGIN_DIR` environment variable.
57
+
58
+
Default: `"~/.tflint.d/plugins"`
59
+
40
60
## Outputs
41
61
42
62
The following outputs are available when the `tflint_wrapper` input is enabled:
For monorepos with multiple TFLint configurations:
167
+
168
+
```yaml
169
+
- uses: terraform-linters/setup-tflint@v6
170
+
with:
171
+
cache: true
172
+
tflint_config_path: '**/.tflint.hcl'
173
+
174
+
- run: tflint --init
175
+
env:
176
+
GITHUB_TOKEN: ${{ github.token }}
177
+
178
+
- run: tflint -f compact
179
+
```
180
+
136
181
### Checks
137
182
138
183
This action supports [Problem Matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) for `--format compact`. You can see annotations in pull requests when TFLint prints issues with the `compact` format.
Copy file name to clipboardExpand all lines: action.yml
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,18 @@ inputs:
16
16
checksums:
17
17
description: Newline-delimited list of valid checksums (SHA256 hashes) for the downloaded TFLint binary. When set, the action will verify that the binary matches one of these checksums before proceeding.
18
18
required: false
19
+
cache:
20
+
description: Enable caching of TFLint plugins
21
+
default: 'false'
22
+
required: false
23
+
tflint_config_path:
24
+
description: Glob pattern for TFLint config files used to generate cache key
25
+
default: '.tflint.hcl'
26
+
required: false
27
+
plugin_dir:
28
+
description: Directory where TFLint plugins are installed. Can also be set via TFLINT_PLUGIN_DIR environment variable.
29
+
default: '~/.tflint.d/plugins'
30
+
required: false
19
31
outputs:
20
32
stdout:
21
33
description: The output (stdout) produced by the tflint command. Only available if `tflint_wrapper` is set to `true`.
0 commit comments