Adapt to new measurements format (#999)

This commit is contained in:
Moritz Sanft 2023-01-19 10:14:10 +01:00 committed by GitHub
parent 2c6a3c398f
commit df0fe7178c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ runs:
MEASUREMENTS=$(curl -sS https://cdn.confidential.cloud/constellation/v1/${{ inputs.osImage }}/image/csp/${{ inputs.cloudProvider }}/measurements.image.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].expected = $(echo $MEASUREMENTS | jq ".\"$key\"")" constellation-conf.yaml
yq -i ".provider.${{ inputs.cloudProvider }}.measurements.[$key] = $(echo $MEASUREMENTS | jq ".\"$key\"")" constellation-conf.yaml
yq -i ".provider.${{ inputs.cloudProvider }}.measurements.[$key].warnOnly = false" constellation-conf.yaml
done
yq -i '.provider.${{ inputs.cloudProvider }}.measurements |= array_to_map' constellation-conf.yaml