Skip to content

Commit 3190142

Browse files
committed
tools: add daily WPT Report workflow step summary
1 parent 72fda7f commit 3190142

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/daily-wpt-fyi.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,21 @@ jobs:
133133
working-directory: out/wpt
134134
run: |
135135
gzip wptreport.json
136+
echo "## Node.js ${{ steps.setup-node.outputs.node-version }}" >> $GITHUB_STEP_SUMMARY
136137
for WPT_FYI_ENDPOINT in "https://wpt.fyi/api/results/upload" "https://staging.wpt.fyi/api/results/upload"
137138
do
138-
curl \
139+
response=$(curl -sS \
139140
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
140141
141142
-F "labels=master" \
142-
$WPT_FYI_ENDPOINT
143+
$WPT_FYI_ENDPOINT)
144+
145+
if [[ $response =~ Task\ ([0-9]+)\ added\ to\ queue ]]; then
146+
run_id=${BASH_REMATCH[1]}
147+
origin=${WPT_FYI_ENDPOINT%/api/results/upload}
148+
149+
echo "" >> $GITHUB_STEP_SUMMARY
150+
echo "Run ID [$run_id]($origin/api/runs/$run_id) added to the processor queue at $origin" >> $GITHUB_STEP_SUMMARY
151+
echo "- [View on the ${origin:8} dashboard]($origin/results?run_id=$run_id)" >> $GITHUB_STEP_SUMMARY
152+
fi
143153
done

0 commit comments

Comments
 (0)