From 9be0c5fdc8defba994a1b62df70ac3707165ca2a Mon Sep 17 00:00:00 2001 From: "edward.zeng" Date: Fri, 10 Dec 2021 10:27:07 +0800 Subject: [PATCH] [skip ci] Fix git commit error when nothing changed (#13132) Signed-off-by: Edward Zeng --- .github/workflows/all-contributors.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/all-contributors.yaml b/.github/workflows/all-contributors.yaml index d6ff728807..23ef4570d3 100644 --- a/.github/workflows/all-contributors.yaml +++ b/.github/workflows/all-contributors.yaml @@ -59,8 +59,7 @@ jobs: git config --global user.email "sre-ci-robot@zilliz.com" git config --global user.name "sre-ci-robot" git add -u - git commit -s -m 'Update all contributors' - git push + git diff-index --cached --quiet HEAD || (git commit -s -m 'Update all contributors' && git push)