Skip to content

Commit

Permalink
feat: generate & add sbom to release assets (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
MxNxPx authored Oct 25, 2024
1 parent 7ab7ec8 commit 4ed229c
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/publish-bundle-rke2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Publish Zarf Package

on:
workflow_call:
inputs:
tag-name:
required: true
type: string

permissions:
contents: read
contents: write
packages: write
id-token: write

Expand Down Expand Up @@ -52,11 +56,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

####
# Build and publish bundle
####
- name: Build and publish rke2 bundle
run: |
uds run create-bundle-rke2 --set EXTRA_ARGS="--no-progress"
uds inspect --sbom build/uds-bundle-software-factory-nutanix-rke2*.tar.zst
uds publish build/uds-bundle-software-factory-nutanix-rke2-amd64-*.tar.zst oci://ghcr.io/defenseunicorns/uds-bundle --no-progress
- name: Upload SBOM to Release
id: upload-sbom-to-release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG_NAME="v${{ inputs.tag-name }}"
gh release upload "${TAG_NAME}" "$(find . -maxdepth 1 -type f -name "*-sboms.tar" -print0 | xargs -0 echo)"
- name: Cleanup
run: |
uds run clean

0 comments on commit 4ed229c

Please sign in to comment.