From e2baf3f4f51037dae90235bced558d4b8711827a Mon Sep 17 00:00:00 2001 From: Javier Rodriguez Date: Thu, 10 Apr 2025 13:38:50 +0200 Subject: [PATCH] fix(ci): Modify condition that assigns attestations hash Signed-off-by: Javier Rodriguez --- .github/workflows/release.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cf01b9b44..bad814bd0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -216,8 +216,11 @@ jobs: chainloop attestation push --attestation-id ${{ needs.init_attestation.outputs.attestation_id }} attestation_sha=$(chainloop wf run describe --id ${{ needs.init_attestation.outputs.attestation_id }} -o json | jq -r '.attestation.digest') # check that the command succeeded - [ -n "$attestation_sha" ] || exit 1 - echo "attestation_sha=$attestation_sha" >> $GITHUB_OUTPUT + if [ -n "$attestation_sha" ]; then + echo "attestation_sha=$attestation_sha" >> $GITHUB_OUTPUT + else + exit 1 + fi - name: Mark attestation as failed if: ${{ failure() }}