Updates build action, to only commit when something has changed

This commit is contained in:
Alicia Sykes
2023-04-16 16:34:15 +01:00
committed by GitHub
parent 0295f00e0e
commit 4b28ade1b0

View File

@@ -38,5 +38,10 @@ jobs:
git config --global user.name "Liss-Bot"
git config --global user.email "alicia-gh-bot@mail.as93.net"
git add .
git commit -m "Updates templates (auto-generated, on ${{ steps.date.outputs.date }})"
git push
if git diff --staged --quiet; then
echo "Nothin new added, so nothing to commit, exiting..."
exit 0
else
git commit -m "Updates templates (auto-generated, on ${{ steps.date.outputs.date }})"
git push
fi