Skip to content

Commit

Permalink
feat: generate/upload sbom for cosign projects
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <[email protected]>
  • Loading branch information
developer-guy committed Dec 20, 2021
1 parent 0c25819 commit ebbdca9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
with:
go-version: '1.17.x'
- uses: imjasonh/[email protected]
with:
version: tip
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SRCS = $(shell find cmd -iname "*.go") $(shell find pkg -iname "*.go")
GOLANGCI_LINT_DIR = $(shell pwd)/bin
GOLANGCI_LINT_BIN = $(GOLANGCI_LINT_DIR)/golangci-lint

KO_PREFIX ?= gcr.io/projectsigstore
KO_PREFIX ?= docker.io/devopps
export KO_DOCKER_REPO=$(KO_PREFIX)

.PHONY: all lint test clean cosign cross
Expand Down Expand Up @@ -127,26 +127,26 @@ clean:
.PHONY: ko
ko:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
ko publish --base-import-paths --bare \
ko publish --base-import-paths --bare --sbom \
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
github.com/sigstore/cosign/cmd/cosign

# cosigned
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
KO_DOCKER_REPO=${KO_PREFIX}/cosigned ko publish --bare \
KO_DOCKER_REPO=${KO_PREFIX}/cosigned ko publish --bare --sbom \
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
github.com/sigstore/cosign/cmd/cosign/webhook

# sget
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
ko publish --base-import-paths --bare \
ko publish --base-import-paths --bare --sbom \
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
github.com/sigstore/cosign/cmd/sget

.PHONY: ko-local
ko-local:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
ko publish --base-import-paths --bare \
ko publish --base-import-paths --bare --sbom \
--tags $(GIT_VERSION) --tags $(GIT_HASH) --local \
github.com/sigstore/cosign/cmd/cosign

Expand Down

0 comments on commit ebbdca9

Please sign in to comment.