Skip to content

Commit

Permalink
feature: add sbom and signing to the produced binaries (#143)
Browse files Browse the repository at this point in the history
## Description

Related to open-component-model/ocm-project#82


## What type of PR is this? (check all applicable)

- [ ] πŸ• Feature
- [ ] πŸ› Bug Fix
- [ ] πŸ“ Documentation Update
- [ ] 🎨 Style
- [ ] πŸ§‘β€πŸ’» Code Refactor
- [ ] πŸ”₯ Performance Improvements
- [ ] βœ… Test
- [ ] πŸ€– Build
- [ ] πŸ” CI
- [ ] πŸ“¦ Chore (Release)
- [ ] ⏩ Revert

## Related Tickets & Documents

<!-- 
Please use this format link issue numbers: Fixes #123

https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->
- Related Issue # (issue)
- Closes # (issue)
- Fixes # (issue)
> Remove if not applicable

## Screenshots

<!-- Visual changes require screenshots -->


## Added tests?

- [ ] πŸ‘ yes
- [ ] πŸ™… no, because they aren't needed
- [ ] πŸ™‹ no, because I need help
- [ ] Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration


## Added to documentation?

- [ ] πŸ“œ README.md
- [ ] πŸ™… no documentation needed

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
Skarlso authored Jun 3, 2024
1 parent 13d6bf9 commit 614c0d1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:
run: |
mkdir -p output
kustomize build ./config/default > ./output/install.yaml
- name: Setup Syft
uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 # v0.15.11
- name: Setup Cosign
uses: sigstore/cosign-installer@v3.5.0
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
18 changes: 18 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ checksum:
- glob: output/install.yaml
snapshot:
name_template: "{{ incpatch .Version }}-next"
sboms:
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}-{{ .Version }}-sbom.spdx.json"
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- '--yes'
artifacts: checksum
output: true
changelog:
sort: asc
filters:
Expand Down

0 comments on commit 614c0d1

Please sign in to comment.