Skip to content

Commit

Permalink
add syft for sbom and image templates
Browse files Browse the repository at this point in the history
  • Loading branch information
anderssonw committed Sep 15, 2023
1 parent 348c4d5 commit 436bd32
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/release-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
- name: Install Cosign
uses: sigstore/cosign-installer@v3.1.2

- name: Install Syft for SBOM Generation
shell: bash
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin

- name: Release with Goreleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand Down
24 changes: 23 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,38 @@ archives:

dockers:
- image_templates:
- "ghcr.io/kartverket/skiperator"
- "ghcr.io/kartverket/skiperator:{{ .Version }}-amd64"
extra_files:
- ./
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/kartverket/skiperator:{{ .Version }}-arm64v8"
extra_files:
- ./
use: buildx
goarch: arm64
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/arm64/v8"

docker_manifests:
- name_template: "ghcr.io/kartverket/skiperator:{{ .Version }}"
image_templates:
- "ghcr.io/kartverket/skiperator:{{ .Version }}-amd64"
- "ghcr.io/kartverket/skiperator:{{ .Version }}-arm64v8"

signs:
- cmd: cosign
signature: "${artifact}.sig"
args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-signature=${signature}", "-y", "${artifact}"]
artifacts: all

sboms:
- artifacts: archive

checksum:
name_template: "checksums.txt"
snapshot:
Expand Down

0 comments on commit 436bd32

Please sign in to comment.