From b33098346f40200f8c31ea771907804387c0aad2 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Tue, 21 Mar 2023 17:35:07 +0100 Subject: [PATCH] ci: add missing version expansion to verify test Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/actions/e2e_verify/action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/e2e_verify/action.yml b/.github/actions/e2e_verify/action.yml index db8302760..5a39d2264 100644 --- a/.github/actions/e2e_verify/action.yml +++ b/.github/actions/e2e_verify/action.yml @@ -17,10 +17,20 @@ runs: run: | yq -i 'del(.provider.${{ inputs.cloudProvider }}.measurements)' constellation-conf.yaml + - name: Expand version path + id: expand-version + uses: ./.github/actions/shortname + with: + shortname: ${{ inputs.osImage }} + - name: Fetch & write measurements shell: bash run: | - MEASUREMENTS=$(curl -fsSL https://cdn.confidential.cloud/constellation/v1/${{ inputs.osImage }}/image/csp/${{ inputs.cloudProvider }}/measurements.json | jq '.measurements' -r) + ref=${{ steps.expand-version.outputs.ref }} + stream=${{ steps.expand-version.outputs.stream }} + version=${{ steps.expand-version.outputs.version }} + verPath="ref/${ref}/stream/${stream}/${version}" + MEASUREMENTS=$(curl -fsSL https://cdn.confidential.cloud/constellation/v1/${verPath}/image/csp/${{ inputs.cloudProvider }}/measurements.json | jq '.measurements' -r) for key in $(echo $MEASUREMENTS | jq 'keys[]' -r); do echo Updating $key to $(echo $MEASUREMENTS | jq ".\"$key\"" -r) yq -i ".provider.${{ inputs.cloudProvider }}.measurements.[$key] = $(echo $MEASUREMENTS | jq ".\"$key\"")" constellation-conf.yaml