From d172c5d467899ca0b5eb88fbeee85c1cb6fb56ee Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 27 Nov 2021 17:52:21 -0700 Subject: [PATCH] Simplify CI commit in "update" workflow The steps taken to commit the changes to services.json were overly complicated. This simplifies the steps to just `exit 0` if there are no changes to commit. --- .github/workflows/update-instances.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index 2227886..07d3a9c 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -59,10 +59,6 @@ jobs: # ============================================================== # Push changes # ============================================================== - if [[ $(git diff-index --quiet HEAD) ]]; then - echo "No updates" - else - git add services.json - git commit -m '[CI] Auto update instances' - git push - fi + git add services.json + git commit -m '[CI] Auto update instances' || exit 0 + git push