ci: make the Gitea README refresh re-run safe
readme / refresh (push) Skipped

This commit is contained in:
trex Bot committed 2026-11-20 10:51:10 -06:00
1 parent 722d1182f1
commit 79a3ca2a2e
1 file changed
+6
+6
View File
@@ -54,6 +54,12 @@ jobs:
run: | run: |
git config user.name trex git config user.name trex
git config user.email nanobot@jonb.io git config user.email nanobot@jonb.io
# Re-running an older run checks out that run's head SHA, which can be
# behind main, so a plain push is rejected as non-fast-forward. Move
# HEAD to the current tip first; the regenerated README is
# authoritative, so it is re-staged on top of it.
git fetch --quiet origin main
git reset --quiet origin/main
git add README.md git add README.md
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "no change" echo "no change"