-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 900 Bytes
/
check.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
name: "Terraform checks"
# Quick checks that run on every PR, regardless of whether any Terraform code changed
# Set as required for PRs to be merged on GitHub
on:
pull_request:
push:
branches:
- "main"
jobs:
tf_fmt:
name: Validate Terraform formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.3
- name: Check formatting of all Terraform files
run: terraform fmt -check -diff -recursive
tfsec:
name: tfsec check
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: tfsec
uses: aquasecurity/[email protected]
with:
working_directory: terraform/
github_token: ${{ secrets.GITHUB_TOKEN }}