-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (75 loc) · 2.06 KB
/
Copy pathpr.yml
File metadata and controls
93 lines (75 loc) · 2.06 KB
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
90
91
92
93
name: Go
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
permissions: {}
jobs:
golang:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout
id: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Go
id: setup
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'lambda/go.mod'
- 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-24.04
permissions:
contents: read
steps:
- name: Checkout
id: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Terraform
id: setup
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
- 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: Setup TFLint
id: tflint-setup
uses: terraform-linters/setup-tflint@6e1e0642c0289bd619021bf6b34e3c08ed1e005a # v6.3.0
with:
tflint_version: 'latest'
- name: Init TFLint
id: tflint-init
run: tflint --init
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run TFLint
id: tflint
run: tflint -f compact