handle the case where there is no changes

This commit is contained in:
Rami Maalouf 2024-06-02 22:03:09 -04:00
parent d2b91c7128
commit b72825bf5c
No known key found for this signature in database

View File

@ -33,8 +33,12 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update submodule via GitHub Action"
git push origin main
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "Update submodule via GitHub Action"
git push origin main
fi
- uses: actions/setup-node@v3
with:
node-version: 18.14