-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (48 loc) · 1.19 KB
/
build_and_validate.yaml
File metadata and controls
49 lines (48 loc) · 1.19 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
name: Build
on:
push:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.openapi/**'
pull_request:
branches: [main]
paths:
- '**.go'
- '.openapi/**'
- '.github/**'
jobs:
build:
env:
GOPATH: /home/runner/work/app-services-sdk-go/go
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
with:
base: main
list-files: shell
filters: |
github:
- '.github/**'
openapi:
- '.openapi/*'
go:
- '**.go'
- run: echo ${{ steps.filter.outputs.openapi }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: 1.26.1
- name: Check Go modules match source code
run: ./scripts/go-mod-check.sh
- name: golangci-lint
if: steps.filter.outputs.go == 'true'
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: v2.11.3
args: --timeout 2m0s