We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec454b7 + 30ee957 commit b7f908eCopy full SHA for b7f908e
.github/workflows/main.yml
@@ -32,6 +32,13 @@ jobs:
32
echo "... done."
33
git --no-pager diff
34
git add -A
35
+ if [ -z "$(git diff --staged)" ]; then
36
+ # To have the action run successfully, if no changes are staged, we
37
+ # manually skip the later commits because they fail with exit code 1
38
+ # and this would then display as a failure for the Action.
39
+ echo "No staged changes to commit. Skipping commit and push."
40
+ exit 0
41
+ fi
42
if [ -n "${{ inputs.message }}" ]; then
43
git commit -m "${{ inputs.message }}"
44
else
0 commit comments