From c1c7647b578dfab61aa370c015c33ed824337916 Mon Sep 17 00:00:00 2001 From: Olivier ORAND Date: Wed, 27 Dec 2023 09:13:00 +0000 Subject: [PATCH] chore(github-action): debug on-commits git commit was failing when there was something to commit! --- .github/workflows/on-commits.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-commits.yml b/.github/workflows/on-commits.yml index ee6cf3aa..2956f191 100644 --- a/.github/workflows/on-commits.yml +++ b/.github/workflows/on-commits.yml @@ -72,9 +72,13 @@ jobs: remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" git add config/blobs.yml - ! git commit -a -m "updating blobs" && \ - git --no-pager log --oneline -5 && \ - git push ${remote_repo} HEAD:master + git status + if ! git commit -a --dry-run;then + git commit -a -m "updating blobs" && \ + git push ${remote_repo} HEAD:master + else + echo "Nothing to commit" + fi # TODO: optimize to only create a dev release if the blobs.yaml file has some changes