Skip to content

Commit 84eec43

Browse files
update code formatter action
1 parent 98656a9 commit 84eec43

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/code_formatter.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ jobs:
1313
- name: Commit black changes
1414
if: failure()
1515
run: |
16-
echo "Need to be formatted."
16+
black .
17+
git config --global user.name github-actions
18+
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
19+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
20+
git commit -am "Formatted with psf/black"
21+
git push --force origin HEAD:$GITHUB_REF

0 commit comments

Comments
 (0)