diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 3f5328c..9eb9be0 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -91,14 +91,16 @@ jobs: - name: 'Commit changes to PR #${{ steps.find-pr.outputs.PR_NUMBER }}' run: | - git config --global user.name "${GITHUB_ACTOR}" - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - git commit \ - --all \ - --message="Updating release date" \ - --message="Generated by ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}." - git push + if ! git diff --quiet; then + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + + git commit \ + --all \ + --message="Updating release date" \ + --message="Generated by ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}." + git push + fi - name: 'Merge PR #${{ steps.find-pr.outputs.PR_NUMBER }}' run: |