mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: fix jq usage in mshv-infra.yaml
Workflow runs fail in the "Get Location" step with:
jq: error (at <stdin>:9): string ("100") and number (0) cannot be added
Use tonumber to explicitly convert string to number instead of the "+ 0"
trick.
Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
b8a61da06a
commit
3a23e2f841
2
.github/workflows/mshv-infra.yaml
vendored
2
.github/workflows/mshv-infra.yaml
vendored
@@ -94,7 +94,7 @@ jobs:
|
||||
fi
|
||||
|
||||
remaining=$(az vm list-usage --location "$location" --query "[?name.value=='$family'] | [0]" -o json |
|
||||
jq '.limit + 0 - .currentValue >= $ARGS.positional[0]' --jsonargs "$vcpu")
|
||||
jq '(.limit | tonumber) - (.currentValue | tonumber) >= ($ARGS.positional[0] | tonumber)' --jsonargs "$vcpu")
|
||||
if [[ "$remaining" = true ]]; then
|
||||
echo "Sufficient quota found in $location"
|
||||
echo "location=$location" >> "$GITHUB_OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user