Skip to content

Commit fe71328

Browse files
committed
fix(ci): use /environments endpoint to get environment ID
GET /projects/{id} does not embed environments. Use the dedicated /projects/{id}/environments endpoint instead.
1 parent f8d98b4 commit fe71328

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
TEMPS_DATA_DIR: /tmp/temps-data
4040
ADMIN_EMAIL: admin@localho.st
4141
ADMIN_PASSWORD: E2eTestPass123!
42-
API_BASE: http://localhost:8081/api
42+
API_BASE: http://localhost:8081
4343

4444
steps:
4545
- name: Free up disk space
@@ -285,8 +285,8 @@ jobs:
285285
# --- Get production environment ID ---
286286
ENV_RESPONSE=$(curl -s \
287287
-H "Authorization: Bearer $API_KEY" \
288-
"$API_BASE/projects/$PROJECT_ID")
289-
ENV_ID=$(echo "$ENV_RESPONSE" | jq -r '.environments[0].id // empty')
288+
"$API_BASE/projects/$PROJECT_ID/environments")
289+
ENV_ID=$(echo "$ENV_RESPONSE" | jq -r '.[0].id // .environments[0].id // empty')
290290
291291
if [ -z "$ENV_ID" ]; then
292292
echo "FAIL: Could not find environment for project $PROJECT_ID"

0 commit comments

Comments
 (0)