just exit if no changes to commit

This commit is contained in:
github-actions
2024-08-06 12:30:29 +02:00
parent eea4423a8f
commit 9ab4818515

View File

@@ -30,9 +30,13 @@ jobs:
run: | run: |
git config --global user.name "github-actions" git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com" git config --global user.email "github-actions@github.com"
git add . if [[ -n $(git status --porcelain) ]]; then
git commit -m "po/mo updates" git add .
git push git commit -m "po/mo updates"
git push
else
echo "No changes to commit."
fi
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}