-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (70 loc) · 2.31 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Lint
on: [push]
jobs:
fmt:
name: fmt check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hashicorp/setup-terraform@v3
with:
# renovate: datasource=github-releases depName=hashicorp/terraform
terraform_version: "1.8.3"
- uses: terramate-io/terramate-action@v2
with:
# renovate: datasource=github-releases depName=terramate-io/terramate
version: "0.8.4"
- name: terramate generate check
run: terramate generate --detailed-exit-code
- name: terramate fmt check
run: terramate fmt --detailed-exit-code
- name: terraform fmt check
run: terramate run terraform fmt -check -diff
validate:
name: validate
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hashicorp/setup-terraform@v3
with:
# renovate: datasource=github-releases depName=hashicorp/terraform
terraform_version: "1.8.3"
- uses: terramate-io/terramate-action@v2
with:
# renovate: datasource=github-releases depName=terramate-io/terramate
version: "0.8.4"
- name: Init
run: terramate run terraform init -lockfile=readonly
- name: Validate
run: terramate run terraform validate
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hashicorp/setup-terraform@v3
with:
# renovate: datasource=github-releases depName=hashicorp/terraform
terraform_version: "1.8.3"
- uses: terramate-io/terramate-action@v2
with:
# renovate: datasource=github-releases depName=terramate-io/terramate
version: "0.8.4"
- uses: terraform-linters/setup-tflint@v4
name: Setup
with:
# renovate: datasource=github-releases depName=terraform-linters/tflint
tflint_version: v0.51.1
- name: Init
run: terramate run tflint --init
env:
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
GITHUB_TOKEN: ${{ github.token }}
- name: Lint
run: terramate run tflint --format compact