CI: Replace git-auto-commit-action with a short inline script

Avoids another external dependency.
This commit is contained in:
DeeDeeG 2024-04-18 18:30:34 -04:00
parent f4622128f0
commit 419801037e

View File

@ -43,6 +43,14 @@ jobs:
run: yarn run private-js-docs
- name: Commit All Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: GH Action Documentation
run: |
if [ -n "`git status -s | grep "^ M"`" ]; then
echo "Uncommitted changes to repo files detected. Committing and pushing now."
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add -u
git commit -m "GH Action Documentation"
git push origin HEAD
else
echo "No changes detected in repo files. Nothing to commit!"
fi