Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7824a2f

Browse files
committed
fix: add continue-on-error to SBOM generation and force flag to cosign clean
Change-Id: Ide303c059b1a3d0e3fd77863310e99668325bc69 Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent 0e878a8 commit 7824a2f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ jobs:
11821182
11831183
- name: SBOM Generation and Attestation
11841184
if: github.ref == 'refs/heads/main'
1185+
continue-on-error: true
11851186
env:
11861187
COSIGN_EXPERIMENTAL: 1
11871188
run: |
@@ -1200,7 +1201,7 @@ jobs:
12001201
syft "${IMAGE}" -o spdx-json > "${SBOM_FILE}"
12011202
12021203
echo "Attesting SBOM to image: ${IMAGE}"
1203-
cosign clean "${IMAGE}"
1204+
cosign clean --force=true "${IMAGE}"
12041205
cosign attest --type spdxjson \
12051206
--predicate "${SBOM_FILE}" \
12061207
--yes \

.github/workflows/release.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ jobs:
498498

499499
- name: SBOM Generation and Attestation
500500
if: ${{ !inputs.dry_run }}
501+
continue-on-error: true
501502
env:
502503
COSIGN_EXPERIMENTAL: "1"
503504
run: |
@@ -509,7 +510,7 @@ jobs:
509510
510511
# Attest SBOM to multi-arch image
511512
echo "Attesting SBOM to multi-arch image: ${{ steps.build_docker.outputs.multiarch_image }}"
512-
cosign clean "${{ steps.build_docker.outputs.multiarch_image }}"
513+
cosign clean --force=true "${{ steps.build_docker.outputs.multiarch_image }}"
513514
cosign attest --type spdxjson \
514515
--predicate coder_${{ steps.version.outputs.version }}_sbom.spdx.json \
515516
--yes \
@@ -522,7 +523,7 @@ jobs:
522523
syft "${latest_tag}" -o spdx-json > coder_latest_sbom.spdx.json
523524
524525
echo "Attesting SBOM to latest image: ${latest_tag}"
525-
cosign clean "${latest_tag}"
526+
cosign clean --force=true "${latest_tag}"
526527
cosign attest --type spdxjson \
527528
--predicate coder_latest_sbom.spdx.json \
528529
--yes \

0 commit comments

Comments
 (0)