From b1f4cf0670682041f7cb8f7c07491da9c5982d85 Mon Sep 17 00:00:00 2001 From: noraworld Date: Sun, 13 Mar 2022 03:18:40 +0900 Subject: [PATCH] Do not commit if nothing to commit --- action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 9cf9e92..a4f7a2b 100644 --- a/action.yml +++ b/action.yml @@ -72,8 +72,10 @@ runs: - name: Update mapping file # https://github.com/actions/checkout/tree/2d1c1198e79c30cca5c3957b1e3b65ce95b5356e#push-a-commit-using-the-built-in-token run: | - git config user.name github-actions - git config user.email github-actions@github.com - git commit -am "Update mapping file" - git push + if [ -n "$(git status --porcelain)" ]; then + git config user.name github-actions + git config user.email github-actions@github.com + git commit -am "Update mapping file" + git push + fi shell: sh