Skip to content

Commit e2a95bf

Browse files
committed
fix(verify-status): stage before diff so a new status.json is committed
git diff ignores untracked files, so the first run created status.json but skipped the commit. Stage first, then check git diff --cached. Refs #1
1 parent 530c7b2 commit e2a95bf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/verify-status.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ jobs:
4141

4242
- name: Commit if changed (TechEngineBot)
4343
run: |
44-
if git diff --quiet -- data/_verify/status.json; then
44+
# Stage first so a brand-new (untracked) status.json is detected too —
45+
# `git diff` alone ignores untracked files.
46+
git add data/_verify/status.json
47+
if git diff --cached --quiet; then
4548
echo "verification status unchanged"; exit 0
4649
fi
4750
# Attribute the commit to the TechEngineBot account (id 289859915).
4851
git config user.name "TechEngineBot"
4952
git config user.email "289859915+TechEngineBot@users.noreply.github.com"
50-
git add data/_verify/status.json
5153
git commit -m "chore(verify): refresh verification status aggregate"
5254
git push origin HEAD:main

0 commit comments

Comments
 (0)