workflow: use git diff --cached
This commit is contained in:
parent
8d9892e958
commit
ed52562b55
@ -50,9 +50,8 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
git add flake.lock
|
||||
if git diff --quiet; then
|
||||
echo "No changes to commit."
|
||||
else
|
||||
git commit -m "Update flake.lock $(date -I)"
|
||||
git push origin flake-updates
|
||||
fi
|
||||
git status
|
||||
git diff --cached --quiet && echo "No changes to commit." && exit 0
|
||||
|
||||
git commit -m "Update flake.lock $(date -I)"
|
||||
git push origin flake-updates
|
||||
|
Loading…
x
Reference in New Issue
Block a user