Skip to content

Commit ec350d8

Browse files
waveywavesclaude
andcommitted
feat: add GitHub Step Summary with per-repo results table
Writes a markdown summary with repo links, branch, status, and commit links so operators can verify rebuilds without checking each repo individually. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b1b0427 commit ec350d8

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/trigger-image-rebuilds.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
OK=0
7070
SKIPPED=0
7171
FAILED=0
72+
RESULTS=""
7273
7374
for REPO in $REPOS; do
7475
if [[ -n "$TARGET_REPO" ]] && [[ "$REPO" != "$TARGET_REPO" ]]; then
@@ -81,6 +82,7 @@ jobs:
8182
# Check if branch exists
8283
if ! gh api "repos/$FULL_REPO/branches/$BRANCH" --silent 2>/dev/null; then
8384
echo "SKIP $REPO: branch $BRANCH not found"
85+
RESULTS="${RESULTS}| ${REPO} | ${BRANCH} | Skipped (no branch) | - |\n"
8486
SKIPPED=$((SKIPPED + 1))
8587
continue
8688
fi
@@ -99,10 +101,13 @@ jobs:
99101
"${SHA_ARGS[@]}" \
100102
--field branch="$BRANCH" 2>&1; then
101103
echo "FAILED $REPO ($BRANCH)"
104+
RESULTS="${RESULTS}| ${REPO} | ${BRANCH} | Failed | - |\n"
102105
FAILED=$((FAILED + 1))
103106
continue
104107
fi
108+
COMMIT_URL="https://github.com/${FULL_REPO}/commits/${BRANCH}"
105109
echo "OK $REPO ($BRANCH)"
110+
RESULTS="${RESULTS}| [${REPO}](${COMMIT_URL}) | ${BRANCH} | OK | [view](${COMMIT_URL}) |\n"
106111
OK=$((OK + 1))
107112
done
108113
@@ -117,6 +122,19 @@ jobs:
117122
echo "---"
118123
echo "Summary: $TOTAL repos processed, $OK ok, $SKIPPED skipped, $FAILED failed"
119124
125+
# Write GitHub Step Summary
126+
{
127+
echo "## Trigger Image Rebuilds"
128+
echo ""
129+
echo "**Version:** ${VERSION} | **Branch:** ${BRANCH} | **Timestamp:** ${TIMESTAMP}"
130+
echo ""
131+
echo "| Repo | Branch | Status | Commit |"
132+
echo "|------|--------|--------|--------|"
133+
echo -e "$RESULTS"
134+
echo ""
135+
echo "**Total:** ${TOTAL} | **OK:** ${OK} | **Skipped:** ${SKIPPED} | **Failed:** ${FAILED}"
136+
} >> "$GITHUB_STEP_SUMMARY"
137+
120138
if [[ $FAILED -gt 0 ]]; then
121139
exit 1
122140
fi

0 commit comments

Comments
 (0)