Skip to content

Commit fc9b394

Browse files
committed
tweak(ci/wiki-sync): do not create wiki commits when nothing changes
1 parent d6964d4 commit fc9b394

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/wiki-sync.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ jobs:
5656
git config --global user.name 'github-actions[bot]'
5757
5858
git add .
59-
git commit \
60-
--author="$WIKI_SYNC_REF_AUTHOR" --date="$WIKI_SYNC_REF_AUTHOR_DATE" \
61-
--message="$(cat /tmp/wiki_sync_commit_message)" \
62-
--allow-empty
63-
git push
59+
if git diff --cached --quiet; then
60+
echo 'No changes staged, skipping commit'
61+
else
62+
git commit \
63+
--author="$WIKI_SYNC_REF_AUTHOR" --date="$WIKI_SYNC_REF_AUTHOR_DATE" \
64+
--message="$(cat /tmp/wiki_sync_commit_message)"
65+
git push
66+
fi

0 commit comments

Comments
 (0)