mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
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:
co-authored by
Claude Code
parent
bea601ac76
commit
166ec9a51e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user