-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.13 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
name: build
on:
pull_request:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
id: vars
run: |
goVersion=$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
echo "go_version=${goVersion}" >> "$GITHUB_OUTPUT"
echo "Using Go version ${goVersion}"
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ steps.vars.outputs.go_version }}
-
name: Install syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
-
name: Build
uses: goreleaser/goreleaser-action@v3.1.0
with:
version: latest
args: release --config=.github/goreleaser.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Scan dependencies
uses: anchore/sbom-action@v0
with:
dependency-snapshot: true