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 1111 goreleaser :
1212 runs-on : ubuntu-latest
1313
14-
1514 steps :
1615 - name : Checkout
1716 uses : actions/checkout@v4
2524 go-version : ' ~1.22'
2625 - name : Clean dist directory
2726 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
2831 - name : Run GoReleaser
2932 uses : goreleaser/goreleaser-action@v6
3033 with :
Original file line number Diff line number Diff line change @@ -68,3 +68,12 @@ release:
6868 github :
6969 owner : kubernetes-sigs
7070 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