From a9a56204ecd5f6ecfb19a01e6dd4b7458cb621db Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Fri, 13 Oct 2023 13:44:44 +0200 Subject: [PATCH] fix: commit only if there is something to commit --- .github/workflows/go-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 7300abe..d3bea6e 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -92,7 +92,7 @@ jobs: git add . git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - git commit -m "chore: remove protoc version comments" + git diff --cached --quiet || git commit -m "chore: remove protoc version comments" fi go generate -x ./... if [[ -n "$IGNORE_PROTOC_VERSION_COMMENTS" ]]; then