From a7b5f4408438be41bb93f294df3d1c86572eafd6 Mon Sep 17 00:00:00 2001 From: Enguerrand Allamel Date: Sun, 15 Dec 2024 12:07:03 +0100 Subject: [PATCH] add fix for json format + debug --- .github/workflows/slsa-generator-nodejs-custom.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slsa-generator-nodejs-custom.yaml b/.github/workflows/slsa-generator-nodejs-custom.yaml index 7cd4ff9..61104ab 100644 --- a/.github/workflows/slsa-generator-nodejs-custom.yaml +++ b/.github/workflows/slsa-generator-nodejs-custom.yaml @@ -127,13 +127,14 @@ jobs: env: ATTESTATION_PATH: ${{ steps.scan-attestations-signed.outputs.ATTESTATION_SIGNED_PATH }} run: | + cat $ATTESTATION_PATH response=$(curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/${{ github.repository }}/attestations \ - -d '{"value": '$(cat $ATTESTATION_PATH)'}' \ + -d "{\"value\": $(cat $ATTESTATION_PATH)}" \ -w "%{http_code}" -o response.json) http_code=$(jq -r '.status' response.json)