@@ -64,13 +64,20 @@ jobs:
6464 fi
6565
6666 git add --all
67- git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
67+
68+ if ! git diff-index --quiet --cached HEAD; then
69+ git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
70+ else
71+ echo "No staged changes to commit."
72+ exit 0
73+ fi
6874
6975 if [ $? -eq 0 ]; then
7076 git push --set-upstream origin ${GITHUB_SHA::8}
7177 gh pr create --fill --base develop
7278 else
7379 echo "Nothing to commit."
80+ exit 0
7481 fi
7582 env :
7683 GITHUB_TOKEN : ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
@@ -118,13 +125,20 @@ jobs:
118125 fi
119126
120127 git add --all
121- git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
128+
129+ if ! git diff-index --quiet --cached HEAD; then
130+ git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
131+ else
132+ echo "No staged changes to commit."
133+ exit 0
134+ fi
122135
123136 if [ $? -eq 0 ]; then
124137 git push --set-upstream origin ${GITHUB_SHA::8}
125138 gh pr create --fill --base develop
126139 else
127140 echo "Nothing to commit."
141+ exit 0
128142 fi
129143 env :
130144 GITHUB_TOKEN : ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
@@ -164,13 +178,20 @@ jobs:
164178 fi
165179
166180 git add --all
167- git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
181+
182+ if ! git diff-index --quiet --cached HEAD; then
183+ git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
184+ else
185+ echo "No staged changes to commit."
186+ exit 0
187+ fi
168188
169189 if [ $? -eq 0 ]; then
170190 git push --set-upstream origin ${GITHUB_SHA::8}
171191 gh pr create --fill --base develop
172192 else
173193 echo "Nothing to commit."
194+ exit 0
174195 fi
175196 env :
176197 GITHUB_TOKEN : ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
@@ -215,13 +236,20 @@ jobs:
215236 fi
216237
217238 git add --all
218- git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
239+
240+ if ! git diff-index --quiet --cached HEAD; then
241+ git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
242+ else
243+ echo "No staged changes to commit."
244+ exit 0
245+ fi
219246
220247 if [ $? -eq 0 ]; then
221248 git push --set-upstream origin ${GITHUB_SHA::8}
222249 gh pr create --fill --base develop
223250 else
224251 echo "Nothing to commit."
252+ exit 0
225253 fi
226254 env :
227255 GITHUB_TOKEN : ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
0 commit comments