Skip to content

Commit 15ec04c

Browse files
authored
Merge pull request #126 from PolicyEngine/fix/fix-deploy-errors
fix: Fix staging/canary URL extraction in deploy workflow
2 parents 531fdfd + b79e80b commit 15ec04c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
run: |
264264
STAGING_URL=$(gcloud run services describe ${{ vars.API_SERVICE_NAME }} \
265265
--region=${{ vars.GCP_REGION }} \
266-
--format='value(status.traffic[tag=staging].url)')
266+
--format=json | jq -r '.status.traffic[] | select(.tag=="staging") | .url')
267267
echo "url=$STAGING_URL" >> "$GITHUB_OUTPUT"
268268
echo "Staging URL: $STAGING_URL"
269269
@@ -403,7 +403,7 @@ jobs:
403403
run: |
404404
CANARY_URL=$(gcloud run services describe ${{ vars.API_SERVICE_NAME }} \
405405
--region=${{ vars.GCP_REGION }} \
406-
--format='value(status.traffic[tag=canary].url)')
406+
--format=json | jq -r '.status.traffic[] | select(.tag=="canary") | .url')
407407
echo "Canary URL: $CANARY_URL"
408408
chmod +x .github/scripts/*.sh
409409
.github/scripts/health-check.sh "$CANARY_URL/health"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix staging and canary URL extraction in deploy workflow — gcloud format filter returned empty, replaced with JSON + jq parsing.

0 commit comments

Comments
 (0)