Skip to content

Commit 1f31eaf

Browse files
committed
add tflint workflow
1 parent 03e89cc commit 1f31eaf

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/tflint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: tflint
2+
3+
on:
4+
push:
5+
paths:
6+
- example/infra/**
7+
pull_request:
8+
paths:
9+
- example/infra/**
10+
11+
jobs:
12+
lints:
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- uses: actions/cache@v3
19+
with:
20+
path: ~/.tflint.d/plugins
21+
key: tflint-${{ hashFiles('.tflint.hcl') }}
22+
restore-keys: |
23+
tflint-
24+
25+
- uses: terraform-linters/setup-tflint@v1
26+
27+
- run: tflint --init
28+
working-directory: example/infra
29+
30+
- run: tflint -f compact
31+
working-directory: example/infra

0 commit comments

Comments
 (0)