-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (40 loc) · 1.01 KB
/
lintingci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Linting'
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint_terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Cache plugin dir
uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: tflint-${{ hashFiles('.tflint.hcl') }}
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.44.1
- name: Show version
run: tflint --version
- name: Init TFLint
run: tflint --init
- name: Run TFLint
run: tflint --recursive
fmt_terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup terraform
uses: hashicorp/setup-terraform@v3
- name: Show version
run: terraform --version
- name: Check formatting
run: terraform fmt -check -diff -recursive