Skip to content

Commit cd7baf5

Browse files
Merge pull request #334 from regulaforensics/update-gh-actions
Update GH actions
2 parents 5098cde + 4429c56 commit cd7baf5

1 file changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/update-clients.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ 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}
@@ -119,7 +125,13 @@ jobs:
119125
fi
120126
121127
git add --all
122-
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
123135
124136
if [ $? -eq 0 ]; then
125137
git push --set-upstream origin ${GITHUB_SHA::8}
@@ -167,7 +179,13 @@ jobs:
167179
fi
168180
169181
git add --all
170-
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
182+
183+
if ! git diff-index --quiet --cached HEAD; then
184+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
185+
else
186+
echo "No staged changes to commit."
187+
exit 0
188+
fi
171189
172190
if [ $? -eq 0 ]; then
173191
git push --set-upstream origin ${GITHUB_SHA::8}
@@ -215,7 +233,13 @@ jobs:
215233
fi
216234
217235
git add --all
218-
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
236+
237+
if ! git diff-index --quiet --cached HEAD; then
238+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
239+
else
240+
echo "No staged changes to commit."
241+
exit 0
242+
fi
219243
220244
if [ $? -eq 0 ]; then
221245
git push --set-upstream origin ${GITHUB_SHA::8}

0 commit comments

Comments
 (0)