Skip to content

Commit 4e8f906

Browse files
fix: improve quota check script output handling
2 parents c583930 + 8139c74 commit 4e8f906

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/job-deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,14 @@ jobs:
339339
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
340340
run: |
341341
chmod +x scripts/checkquota.sh
342-
if ! scripts/checkquota.sh; then
342+
QUOTA_OUTPUT="$(scripts/checkquota.sh 2>&1)"; QUOTA_STATUS=$?
343+
echo "$QUOTA_OUTPUT"
344+
if [ "$QUOTA_STATUS" -ne 0 ]; then
343345
# If quota check fails due to insufficient quota, set the flag
344-
if grep -q "No region with sufficient quota found" scripts/checkquota.sh; then
346+
if echo "$QUOTA_OUTPUT" | grep -q "No region with sufficient quota found"; then
345347
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
346348
fi
347-
exit 1 # Fail the pipeline if any other failure occurs
349+
exit 1 # Fail the pipeline if any failure occurs
348350
fi
349351
350352
- name: Set Quota Failure Output

0 commit comments

Comments
 (0)