-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (32 loc) · 988 Bytes
/
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
38
---
name: pre-commit
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "^1.3.7"
terraform_wrapper: false
- name: "Setup prerequisites"
# yamllint disable rule:line-length
run: |
curl -s -L https://github.com/terraform-docs/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-linux-amd64.tar.gz | tar xz -C /usr/local/bin terraform-docs
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
# yamllint enable rule:line-length
- uses: actions/setup-python@v3
with:
cache: "pip"
- uses: pre-commit/[email protected]
with:
extra_args: "--hook-stage manual --all-files"