ci: generate SBOM and sign artifacts using cosign (#4910)

* ci: sign artifacts using cosign

* include SBOM
This commit is contained in:
Mohammed Al Sahaf
2022-09-03 03:37:10 +03:00
committed by GitHub
parent 66476d8c8f
commit d6b3c7d262
2 changed files with 19 additions and 2 deletions

View File

@@ -62,9 +62,18 @@ builds:
goarm: "5"
flags:
- -trimpath
- -mod=readonly
ldflags:
- -s -w
signs:
- cmd: cosign
signature: "${artifact}.sig"
args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output=${signature}", "${artifact}"]
artifacts: all
sboms:
- artifacts: binary
cmd: syft
args: ["$artifact", "--file", "$sbom", "--output", "cyclonedx-json"]
archives:
- format_overrides:
- goos: windows