From ea8253812d13e050369eef128066d8d95492646a Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Fri, 29 Nov 2024 14:48:26 +0100 Subject: [PATCH] Flip the response of git diff-index and use simple `if` --- .github/workflows/update-docs.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 28f55daaf6..a707e1bdc5 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -52,4 +52,8 @@ jobs: export MSG="[Auto] Latest versions as of $(date +'%Y-%m-%d %H:%M')" export DOC=docs/reference/latest-versions-of-every-openrewrite-module.md export JS=src/plugins/latest-versions.js - git diff-index --quiet HEAD ${DOC} || (git commit --message "${MSG}" ${DOC} ${JS} && git push origin master) + if ! git diff-index --quiet HEAD ${DOC}; + then + git commit --message "${MSG}" ${DOC} ${JS}; + git push origin master; + fi