-
Notifications
You must be signed in to change notification settings - Fork 109
47 lines (44 loc) · 1.26 KB
/
build-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
# SPDX-License-Identifier: Apache-2.0
name: Build Pull Request
on: [ pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "^1.20" ]
steps:
- name: Checkout Repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: ${{ matrix.go }}
- name: Setup
run: make setup
#- name: Lint
# run: make lint
- name: Lint
run: make check-headers
- name: Build
run: make build
generate-and-validate:
name: Generate and validate SBOM file
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "^1.20" ]
steps:
- name: Checkout the repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: ${{ matrix.go }}
- name: Generate SBOM
run: make generate
- name: Validate SBOM
uses: chainguard-dev/actions/setup-spdx@main
with:
sbom-path: examples/sbom.spdx