From 628dd5e456f21f192c00d855dad247f5749947ed Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 17 Feb 2023 13:43:41 -0800 Subject: [PATCH] Fix actions failure when there are no new contributors --- .github/workflows/contributions.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/contributions.yaml b/.github/workflows/contributions.yaml index 526c500..df7870b 100644 --- a/.github/workflows/contributions.yaml +++ b/.github/workflows/contributions.yaml @@ -34,8 +34,10 @@ jobs: - name: Commit and push AUTHORS run: | - git pull - git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" - git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" - git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" - git push + if ! git diff --exit-code; then + git pull + git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" + git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" + git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" + git push + fi