Make the job summary reflect whether a sync commit actually pushed

Both bots caught the same false report: the summarize step ran off the
initial drift flag, so the no-drift-after-rebuild exit still claimed a
commit landed on main. The commit step now records pushed=true/false in
its step output and the summary reads it.

Prepared with AI assistance (Claude Code), directed by @pbakaus.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-07-25 19:53:39 -07:00
co-authored by Claude Code
parent bea601ac76
commit 166ec9a51e
+8 -1
View File
@@ -78,6 +78,7 @@ jobs:
fi
- name: Commit generated output
id: commit
if: steps.drift.outputs.changed == 'true'
run: |
set -euo pipefail
@@ -97,6 +98,7 @@ jobs:
# The race that beat us was another sync (or the rebuilt output
# matches the new main); nothing left to push.
echo "No generated output drift after rebuild (attempt $attempt); nothing to push."
echo "pushed=false" >> "$GITHUB_OUTPUT"
exit 0
fi
git commit -m "Sync generated provider output"
@@ -104,6 +106,7 @@ jobs:
git fetch origin main
if git merge-base --is-ancestor origin/main HEAD && git push origin HEAD:main; then
echo "Pushed generated output on attempt $attempt."
echo "pushed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
@@ -125,4 +128,8 @@ jobs:
- name: Summarize generated output commit
if: steps.drift.outputs.changed == 'true'
run: |
echo "Committed generated provider output directly to main." >> "$GITHUB_STEP_SUMMARY"
if [ "${{ steps.commit.outputs.pushed }}" = "true" ]; then
echo "Committed generated provider output directly to main." >> "$GITHUB_STEP_SUMMARY"
else
echo "Generated output drift resolved itself after a mid-run rebuild; nothing was pushed." >> "$GITHUB_STEP_SUMMARY"
fi