File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11
11
goreleaser :
12
12
runs-on : ubuntu-latest
13
13
14
-
15
14
steps :
16
15
- name : Checkout
17
16
uses : actions/checkout@v4
25
24
go-version : ' ~1.22'
26
25
- name : Clean dist directory
27
26
run : rm -rf dist || true
27
+ - name : Install Syft to generate SBOMs
28
+ run : |
29
+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b $HOME/bin
30
+ echo "$HOME/bin" >> $GITHUB_PATH
28
31
- name : Run GoReleaser
29
32
uses : goreleaser/goreleaser-action@v6
30
33
with :
Original file line number Diff line number Diff line change @@ -68,3 +68,12 @@ release:
68
68
github :
69
69
owner : kubernetes-sigs
70
70
name : kubebuilder
71
+
72
+ # Add the SBOM configuration at the end to generate SBOM files
73
+ sboms :
74
+ - id : kubebuilder-sbom
75
+ artifacts : binary
76
+ cmd : syft
77
+ args : ["$artifact", "--output", "cyclonedx-json=$document"]
78
+ documents :
79
+ - " {{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.cyclonedx.sbom.json"
You can’t perform that action at this time.
0 commit comments