generated from mrsimonemms/new
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.48 KB
/
build.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
57
58
59
60
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions: read-all
jobs:
commitlint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch-depth is required
- uses: wagoid/commitlint-github-action@v6
pre-commit:
runs-on: ubuntu-latest
env:
TF_TOKEN_app_terraform_io: ${{ secrets.TERRAFORM_CLOUD_SECRET }}
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
TF_VAR_hcloud_token: ${{ secrets.HCLOUD_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch-depth is required
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.20.0'
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
- name: Install Trivy
run: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
- name: Install Terragrunt
uses: jaxxstorm/[email protected]
with:
repo: gruntwork-io/terragrunt
extension-matching: disable
rename-to: terragrunt
chmod: 0755
- name: Init Terragrunt
run: terragrunt run-all init
- uses: pre-commit/[email protected]