From e27acac083f9a4fd6489aa1d61791dc617759eee Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 7 Jan 2024 14:32:48 -0500 Subject: [PATCH] "hellen-one: looks like nothing to commit" --- .../custom-board-update-hellen-one-reference.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/custom-board-update-hellen-one-reference.yaml b/.github/workflows/custom-board-update-hellen-one-reference.yaml index 5a08217..f82634e 100644 --- a/.github/workflows/custom-board-update-hellen-one-reference.yaml +++ b/.github/workflows/custom-board-update-hellen-one-reference.yaml @@ -29,10 +29,22 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub git update Action" git add hellen-one - git commit -am "GHA says update hellen-one" + OUT=$(git commit -am "GHA says update hellen-one" 2>&1) || echo "commit failed, finding out why" + if echo "$OUT" | grep 'nothing to commit'; then + echo "hellen-one: looks like nothing to commit" + echo "NOCOMMIT=true" >> $GITHUB_ENV + exit 0 + elif echo "$OUT" | grep 'changed'; then + echo "hellen-one: looks like something has changed" + exit 0 + else + echo "hellen-one: looks like something unexpected" + exit 1 + fi git status - name: Push + if: ${{ env.NOCOMMIT != 'true'}} uses: ad-m/github-push-action@master with: github_token: ${{ github.token }}