-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (40 loc) · 1 KB
/
tf-lint.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
name: Check Examples
on:
push:
tags:
- v*
branches:
- master
pull_request:
paths:
- 'examples/**'
- '.tflint.hcl'
jobs:
check-terraform-fmt:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@v3
- name: Check Terraform formatting
id: fmt
run: terraform fmt --check --recursive examples
lint-terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: terraform-linters/setup-tflint@v4
name: Setup TFLint
with:
tflint_version: latest
- name: Show version
run: tflint --version
- name: Init TFLint
run: tflint --init
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run TFLint
run: tflint --chdir=examples --recursive -f compact --config="$(pwd -P)/.tflint.hcl"