-
Notifications
You must be signed in to change notification settings - Fork 24
38 lines (33 loc) · 1015 Bytes
/
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
name: ci
on:
- pull_request
jobs:
ci:
runs-on: ubuntu-latest
steps:
# Setup dependencies
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# Run a couple of native Terraform checks
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform fmt -recursive -check
- run: terraform validate
# Checkov
- uses: bridgecrewio/checkov-action@v12
with:
directory: .
quiet: true
skip_check: CKV_TF_1,CKV_GCP_32,CKV_GCP_34,CKV2_GCP_18
framework: terraform
# Terraform-docs
- uses: terraform-docs/[email protected]
with:
working-dir: .
output-file: README.md
output-method: inject
fail-on-diff: true
args: --lockfile=false
git-push: "true" # automatically push the changes to the branch