-
Notifications
You must be signed in to change notification settings - Fork 38
37 lines (30 loc) · 1.05 KB
/
pre-commit.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
name: pre-commit
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
- name: terraform init
id: init
run: terraform init
- name: Install tflint
id: tflint
run: curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Install tfsec
id: tfsec
run: curl -s https://raw.githubusercontent.com/aquasecurity/tfsec/master/scripts/install_linux.sh | bash
- name: Install terraform-docs
id: terraformd-docs
run: |
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz
tar -xzf terraform-docs.tar.gz
chmod +x terraform-docs
mv terraform-docs /usr/local/bin/terraform-docs
- uses: pre-commit/[email protected]