Skip to content

Commit 4e5e949

Browse files
committed
Refactor GitHub Actions workflow to conditionally commit style fixes with Laravel Pint
1 parent 2c19947 commit 4e5e949

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/pint.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
- name: Run Pint
2323
run: composer pint
2424
- name: Commit files
25-
uses: stefanzweifel/git-auto-commit-action@v5
26-
with:
27-
commit_message: Fix style with laravel-pint in GitHub Actions
28-
25+
run: |
26+
git config --local user.email "[email protected]"
27+
git config --local user.name "GitHub Actions"
28+
if [ -n "$(git status --porcelain)" ]; then
29+
git commit -am "Fix style with laravel-pint in GitHub Actions"
30+
git push
31+
else
32+
echo "No changes to commit"
33+
fi

0 commit comments

Comments
 (0)