From 506da2466b67187ab41c8119821744e8202bf8fd Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Wed, 5 Jul 2023 17:07:03 +0200 Subject: [PATCH] ci: release: disable interpretation backslash esc This ensures `jq` can properly parse the given `ARTIFACTS` JSON blob, as it contains escaped newlines in for example the Brew formula. This should address the issue with the generation of SLSA metadata. Signed-off-by: Hidde Beydals --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 005b8551..8261256e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -94,7 +94,7 @@ jobs: run: | set -euo pipefail - hashes=$(echo $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0) + hashes=$(echo -E $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0) echo "hashes=$hashes" >> $GITHUB_OUTPUT image_url=fluxcd/flux-cli:${{ steps.prep.outputs.version }}