From 1193e2d8ba6ba4af8de88ca318f114e3ec3b134a Mon Sep 17 00:00:00 2001 From: Artsiom Tsybulko Date: Fri, 17 Apr 2026 11:20:29 +0300 Subject: [PATCH] Update GH action --- .github/workflows/update-clients.yml | 36 ++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-clients.yml b/.github/workflows/update-clients.yml index a02da30..6ff062b 100644 --- a/.github/workflows/update-clients.yml +++ b/.github/workflows/update-clients.yml @@ -64,13 +64,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -118,13 +125,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -164,13 +178,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} @@ -215,13 +236,20 @@ jobs: fi git add --all - git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + + if ! git diff-index --quiet --cached HEAD; then + git commit -m "Commit: ${{ needs.title.outputs.title }}" -a + else + echo "No staged changes to commit." + exit 0 + fi if [ $? -eq 0 ]; then git push --set-upstream origin ${GITHUB_SHA::8} gh pr create --fill --base develop else echo "Nothing to commit." + exit 0 fi env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}