fix(ci): use /actions/runs endpoint in remaining wait-time steps
ci.yml, website.yml, and firebase-tests.yml still used the wrong /actions/tasks endpoint in their "Print runner wait time" steps. The /actions/tasks response does not contain workflow_runs, so the run lookup always failed and wait times were never reported. Closes #523 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0dd1d7232b
commit
92b0d2c532
@@ -21,7 +21,7 @@ jobs:
|
||||
runner_start=$(date +%s)
|
||||
created_at=$(curl -sf \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=100" \
|
||||
| python3 -c "import sys,json;data=json.load(sys.stdin);rs=[r for r in data.get('workflow_runs',[]) if r.get('run_number')==$RUN_NUMBER];print(rs[0]['created_at'] if rs else '')" 2>/dev/null)
|
||||
if [ -n "$created_at" ]; then
|
||||
queued_epoch=$(date -d "$created_at" +%s)
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
runner_start=$(date +%s)
|
||||
created_at=$(curl -sf \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=100" \
|
||||
| python3 -c "import sys,json;data=json.load(sys.stdin);rs=[r for r in data.get('workflow_runs',[]) if r.get('run_number')==$RUN_NUMBER];print(rs[0]['created_at'] if rs else '')" 2>/dev/null)
|
||||
if [ -n "$created_at" ]; then
|
||||
queued_epoch=$(date -d "$created_at" +%s)
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
runner_start=$(date +%s)
|
||||
created_at=$(curl -sf \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=100" \
|
||||
| python3 -c "import sys,json;data=json.load(sys.stdin);rs=[r for r in data.get('workflow_runs',[]) if r.get('run_number')==$RUN_NUMBER];print(rs[0]['created_at'] if rs else '')" 2>/dev/null)
|
||||
if [ -n "$created_at" ]; then
|
||||
queued_epoch=$(date -d "$created_at" +%s)
|
||||
|
||||
@@ -132,7 +132,7 @@ jobs:
|
||||
runner_start=$(date +%s)
|
||||
created_at=$(curl -sf \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/tasks?limit=100" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=100" \
|
||||
| python3 -c "import sys,json;data=json.load(sys.stdin);rs=[r for r in data.get('workflow_runs',[]) if r.get('run_number')==$RUN_NUMBER];print(rs[0]['created_at'] if rs else '')" 2>/dev/null)
|
||||
if [ -n "$created_at" ]; then
|
||||
queued_epoch=$(date -d "$created_at" +%s)
|
||||
|
||||
Reference in New Issue
Block a user