Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build_and_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_TOKEN }}
CONTAINER_IMAGE_CP: ghcr.io/chainloop-dev/chainloop/control-plane:${{ github.ref_name }}
CONTAINER_IMAGE_CAS: ghcr.io/chainloop-dev/chainloop/artifact-cas:${{ github.ref_name }}
CONTAINER_IMAGE_CLI: ghcr.io/chainloop-dev/chainloop/cli:${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
CHAINLOOP_WORKFLOW_NAME: "chainloop-vault-build-and-package"
steps:
Expand Down Expand Up @@ -95,6 +96,13 @@ jobs:
artifact-name: cas.cyclonedx.json
output-file: /tmp/sbom.cas.cyclonedx.json

- uses: anchore/sbom-action@c6aed38a4323b393d05372c58a74c39ae8386d02 # v0.15.6
with:
image: ${{ env.CONTAINER_IMAGE_CLI }}
format: cyclonedx-json
artifact-name: cli.cyclonedx.json
output-file: /tmp/sbom.cli.cyclonedx.json

- name: Add Attestation from Goreleaser Output
run: |
jq -r . <<< '${{ steps.release.outputs.artifacts }}' > /tmp/artifacts.json
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
tag=$(echo -n ${{github.ref}} | cut -d / -f3)
gh release download $tag -D /tmp/github-release
for entry in $(ls /tmp/github-release); do
# If the name is cas.cyclonedx.json, controlplane.cyclonedx.json or cli.cyclonedx.json, we need to add the attestation with the correct name
if [[ $entry =~ ^(cas|controlplane|cli)\.cyclonedx\.json$ ]]; then
name=$(echo -n "${entry%.json}" | sed 's/\./-/g')
chainloop attestation add --value "/tmp/github-release/$entry" --name "$name"
continue
fi
chainloop attestation add --value "/tmp/github-release/$entry"
done

Expand Down