-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.23 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: pre-commit
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
env:
TERM: xterm-256color
jobs:
versionExtract:
name: Extract Min/Max Versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Terraform min/max versions
id: minMax
uses: clowdhaus/[email protected]
outputs:
minVersion: ${{ steps.minMax.outputs.minVersion }}
maxVersion: ${{ steps.minMax.outputs.maxVersion }}
preCommit:
name: Pre-commit hooks execute
runs-on: ubuntu-latest
needs: versionExtract
strategy:
matrix:
version:
- ${{ needs.versionExtract.outputs.minVersion }}
- ${{ needs.versionExtract.outputs.maxVersion }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run pre-commit ${{ matrix.version }}
uses: clowdhaus/terraform-composite-actions/[email protected]
with:
terraform-version: ${{ matrix.version }}
terraform-docs-version: v0.19.0
args: "--all-files --color always --show-diff-on-failure"