@@ -226,47 +226,7 @@ runs:
226226 REPO : ${{ github.repository }}
227227 RUN_ID : ${{ github.run_id }}
228228 run : |
229- echo "Generating STATUS.md for test_fpm..."
230- badge_line=""
231-
232- mapfile -t job_lines < <(
233- curl -s -H "Authorization: token $GH_TOKEN" \
234- https://api.github.com/repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100 \
235- | jq -r '.jobs[] | select((.name | type == "string") and (.name | test(".*_fpm$"))) | [.name, .conclusion] | @tsv'
236- )
237-
238- for line in "${job_lines[@]}"; do
239- name="${line%%$'\t'*}"
240- conclusion="${line#*$'\t'}"
241-
242- os="${name%%_*}"
243- compiler="${name#*_}"
244- key="${os}_${compiler}"
245-
246- safe_key="${key//-/'--'}"
247-
248- if [[ "$conclusion" == "success" ]]; then
249- color="brightgreen"
250- label="passing"
251- elif [[ "$conclusion" == "failure" ]]; then
252- color="red"
253- label="failing"
254- elif [[ "$conclusion" == "cancelled" ]]; then
255- color="lightgrey"
256- label="cancelled"
257- else
258- color="lightgrey"
259- label="pending"
260- fi
261-
262- badge=""
263- badge_line="$badge_line $badge"
264- done
265-
266- echo "$badge_line" > STATUS.md
267- mkdir -p status-fpm
268- mv STATUS.md status-fpm/STATUS.md
269- cat status-fpm/STATUS.md
229+ bash "${{ github.action_path }}/scripts/generate-status-fpm.sh"
270230
271231 - name : Deploy STATUS.md (test_fpm)
272232 if : ${{ inputs.generate-status-fpm == 'true' }}
@@ -285,47 +245,7 @@ runs:
285245 REPO : ${{ github.repository }}
286246 RUN_ID : ${{ github.run_id }}
287247 run : |
288- echo "Generating STATUS.md for test_cmake..."
289- badge_line=""
290-
291- mapfile -t job_lines < <(
292- curl -s -H "Authorization: token $GH_TOKEN" \
293- https://api.github.com/repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100 \
294- | jq -r '.jobs[] | select((.name | type == "string") and (.name | test(".*_cmake$"))) | [.name, .conclusion] | @tsv'
295- )
296-
297- for line in "${job_lines[@]}"; do
298- name="${line%%$'\t'*}"
299- conclusion="${line#*$'\t'}"
300-
301- os="${name%%_*}"
302- compiler="${name#*_}"
303- key="${os}_${compiler}"
304-
305- safe_key="${key//-/'--'}"
306-
307- if [[ "$conclusion" == "success" ]]; then
308- color="brightgreen"
309- label="passing"
310- elif [[ "$conclusion" == "failure" ]]; then
311- color="red"
312- label="failing"
313- elif [[ "$conclusion" == "cancelled" ]]; then
314- color="lightgrey"
315- label="cancelled"
316- else
317- color="lightgrey"
318- label="pending"
319- fi
320-
321- badge=""
322- badge_line="$badge_line $badge"
323- done
324-
325- echo "$badge_line" > STATUS.md
326- mkdir -p status-cmake
327- mv STATUS.md status-cmake/STATUS.md
328- cat status-cmake/STATUS.md
248+ bash "${{ github.action_path }}/scripts/generate-status-cmake.sh"
329249
330250 - name : Deploy STATUS.md (test_cmake)
331251 if : ${{ inputs.generate-status-cmake == 'true' }}
@@ -344,47 +264,7 @@ runs:
344264 REPO : ${{ github.repository }}
345265 RUN_ID : ${{ github.run_id }}
346266 run : |
347- echo "Generating STATUS.md for test_meson..."
348- badge_line=""
349-
350- mapfile -t job_lines < <(
351- curl -s -H "Authorization: token $GH_TOKEN" \
352- https://api.github.com/repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100 \
353- | jq -r '.jobs[] | select((.name | type == "string") and (.name | test(".*_meson$"))) | [.name, .conclusion] | @tsv'
354- )
355-
356- for line in "${job_lines[@]}"; do
357- name="${line%%$'\t'*}"
358- conclusion="${line#*$'\t'}"
359-
360- os="${name%%_*}"
361- compiler="${name#*_}"
362- key="${os}_${compiler}"
363-
364- safe_key="${key//-/'--'}"
365-
366- if [[ "$conclusion" == "success" ]]; then
367- color="brightgreen"
368- label="passing"
369- elif [[ "$conclusion" == "failure" ]]; then
370- color="red"
371- label="failing"
372- elif [[ "$conclusion" == "cancelled" ]]; then
373- color="lightgrey"
374- label="cancelled"
375- else
376- color="lightgrey"
377- label="pending"
378- fi
379-
380- badge=""
381- badge_line="$badge_line $badge"
382- done
383-
384- echo "$badge_line" > STATUS.md
385- mkdir -p status-meson
386- mv STATUS.md status-meson/STATUS.md
387- cat status-meson/STATUS.md
267+ bash "${{ github.action_path }}/scripts/generate-status-meson.sh"
388268
389269 - name : Deploy STATUS.md (test_meson)
390270 if : ${{ inputs.generate-status-meson == 'true' }}
0 commit comments