bail when NO changes are staged

This commit is contained in:
Fabian Egli 2025-01-06 12:05:42 +01:00 committed by GitHub
parent 83cd546470
commit 30ee957011
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@ jobs:
echo "... done." echo "... done."
git --no-pager diff git --no-pager diff
git add -A git add -A
if [ "$(git diff --staged)" ]; then if [ -z "$(git diff --staged)" ]; then
# To have the action run successfully, if no changes are staged, we # To have the action run successfully, if no changes are staged, we
# manually skip the later commits because they fail with exit code 1 # manually skip the later commits because they fail with exit code 1
# and this would then display as a failure for the Action. # and this would then display as a failure for the Action.