-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (37 loc) · 1.14 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ~1.5
- name: Terraform Version
run: terraform -version
- name: Install terraform-docs
run: |
WORK_DIR=$(mktemp -d)
curl -Lo ${WORK_DIR}/terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz
cd ${WORK_DIR}
tar -xzf terraform-docs.tar.gz
chmod +x terraform-docs
mv terraform-docs /usr/local/bin/terraform-docs
- name: Generate docs
run: make docs
- name: Check git diff is clean (all files generated should be committed)
run: git diff --exit-code
- name: Terraform Format Check
run: make fmt-check
- name: Terraform Validate
run: make validate
- uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.49.0
- name: Lint
run: make lint