-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (73 loc) · 1.9 KB
/
pr.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Go
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
jobs:
golang:
runs-on: ubuntu-22.04
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Go
id: setup
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Install dependencies
id: deps
working-directory: lambda
run: go get .
- name: Build
id: build
working-directory: lambda
run: GOARCH=$([ "$RUNNER_ARCH" = "ARM64" ] && echo "arm64" || echo "amd64") go build -tags lambda.norpc -o bootstrap main.go
env:
GOOS: linux
- name: Go test
id: test
working-directory: lambda
run: go test ./... -cover
terraform:
runs-on: ubuntu-22.04
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Terraform
id: setup
uses: hashicorp/setup-terraform@v1
with:
terraform_version: '1.5.7'
- name: Terraform Format
id: format
run: terraform fmt -check
- name: Terraform Init
id: init
run: terraform init
- name: Terraform Validate
id: validate
run: terraform validate
- name: tfsec
id: tfsec
uses: aquasecurity/tfsec-action@b466648d6e39e7c75324f25d83891162a721f2d6 # v1.0.3
with:
github_token: ${{ github.token }}
- name: Setup TFLint
id: tflint-setup
uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
with:
tflint_version: v0.48.0
- name: Init TFLint
id: tflint-init
run: tflint --init
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run TFLint
id: tflint
run: tflint -f compact