Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 66e59ac

Browse files
authored
one last gopal fix
1 parent cc34d28 commit 66e59ac

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/black.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Black Code Formatter
22

33
on:
44
pull_request:
5-
branches:
5+
branches:
66
- main
77
push:
88
branches:
@@ -25,10 +25,16 @@ jobs:
2525
run: pip install black
2626

2727
- name: Run Black Formatter
28-
run: black package/ tests/
28+
id: action_black
29+
run: black package/ tests/ || echo "Black found formatting issues!"
2930

30-
- name: Commit changes
31-
uses: stefanzweifel/git-auto-commit-action@v4
32-
with:
33-
commit_message: 'style: Format code with Black'
34-
branch: ${{ github.head_ref || github.ref_name }}
31+
- name: Commit and push changes
32+
if: ${{ steps.action_black.outcome == 'success' }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
git config --local user.name "github-actions[bot]"
37+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
38+
git add .
39+
git commit -m "style: format code with Black"
40+
git push

0 commit comments

Comments
 (0)