Skip to content

Commit

Permalink
handle no formatting change
Browse files Browse the repository at this point in the history
  • Loading branch information
shihanwan committed Sep 19, 2024
1 parent 5dd77b0 commit 984fdbd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add .
git commit -m "Apply Black formatting"
git push
if: ${{ steps.black.outcome == 'success' }}
# Check if there are any changes to commit
if ! git diff --cached --quiet; then
git commit -m "Apply Black formatting"
git push
else
echo "No changes to commit"
fi
if: ${{ steps.black.outcome == 'success' }}

0 comments on commit 984fdbd

Please sign in to comment.