From 6494e683cc3b3dae06fc058cecbd220d5bc3c94c Mon Sep 17 00:00:00 2001 From: qcq01083097 Date: Fri, 5 Jun 2026 13:47:03 +0800 Subject: [PATCH] feat: First add, then do diff --- .github/workflows/sync-bailian-cli-skill-reference.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-bailian-cli-skill-reference.yml b/.github/workflows/sync-bailian-cli-skill-reference.yml index 8401723..a111ec9 100644 --- a/.github/workflows/sync-bailian-cli-skill-reference.yml +++ b/.github/workflows/sync-bailian-cli-skill-reference.yml @@ -85,12 +85,14 @@ jobs: mkdir -p "$DEST" rsync -a --delete "$SRC/" "$DEST/" - if git diff --quiet && git diff --cached --quiet; then + # Stage before checking: untracked new files are invisible to `git diff` until added. + git add -A -- skills/bailian-cli/reference + + if git diff --cached --quiet; then echo "No changes to skill reference; exiting." exit 0 fi - git add skills/bailian-cli/reference RUN_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${CLI_RUN}" git commit \ -m "chore(bailian-cli): sync reference from cli" \