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

Commit baeef6d

Browse files
authored
i think this should work
1 parent f502a86 commit baeef6d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/black.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@ jobs:
3030
black package/ tests/
3131
git diff --exit-code || echo "Files have been formatted by Black."
3232
33+
- name: Check for changes
34+
id: check_changes
35+
run: |
36+
git diff --exit-code || echo "Changes detected."
37+
3338
- name: Commit and push changes
34-
if: steps.action_black.outputs.changes != ''
39+
if: steps.check_changes.outputs.changes != ''
3540
env:
3641
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3742
run: |
3843
git config --local user.name "github-actions[bot]"
3944
git config --local user.email "github-actions[bot]@users.noreply.github.com"
4045
git add .
4146
git commit -m "style: format code with Black" || echo "No changes to commit."
42-
git push
47+
git push || echo "Failed to push changes."

0 commit comments

Comments
 (0)