-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from udx/UAT-47
SBOM Generation and Release Enhancements [UAT-47]
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,19 @@ jobs: | |
tags: | | ||
usabilitydynamics/udx-worker:${{ steps.gitversion.outputs.semVer }} | ||
- name: Generate SBOM | ||
run: | | ||
export TRIVY_DISABLE_VEX_NOTICE=true | ||
trivy image --format spdx-json --output sbom.json usabilitydynamics/udx-worker:${{ steps.gitversion.outputs.semVer }} 2>/dev/null | ||
# Save SBOM for later upload | ||
id: generate-sbom | ||
|
||
- name: Upload SBOM Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sbom | ||
path: sbom.json | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
run: | | ||
|
@@ -95,13 +108,19 @@ jobs: | |
git tag ${{ needs.test-pipeline.outputs.semVer }} | ||
git push origin ${{ needs.test-pipeline.outputs.semVer }} | ||
- name: Download SBOM Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: sbom | ||
|
||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ needs.test-pipeline.outputs.semVer }} | ||
body: ${{ needs.test-pipeline.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
files: sbom.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
|
@@ -145,5 +164,23 @@ jobs: | |
usabilitydynamics/udx-worker:${{ needs.test-pipeline.outputs.semVer }} | ||
usabilitydynamics/udx-worker:latest | ||
- name: Download SBOM Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: sbom | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Sign SBOM with Cosign | ||
env: | ||
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | ||
run: | | ||
cosign attest \ | ||
--key env://COSIGN_PRIVATE_KEY \ | ||
--type sbom \ | ||
--predicate sbom.json \ | ||
usabilitydynamics/udx-worker:${{ needs.test-pipeline.outputs.semVer }} | ||
- name: Log out from Docker Hub | ||
run: docker logout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhwPdudrplq/mmIHX6UkTpCJyabn4 | ||
XSbcX5GnT8PXVW/3f7mUTOIYtQK/Rk39VlgivOf0Zq8+2LWmuOp5BAelRw== | ||
-----END PUBLIC KEY----- |