Skip to content

Commit

Permalink
Improve CI with auto style code
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Jan 14, 2025
1 parent 19b7ec5 commit dec5d0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 autopep8
- name: Auto style code with autopep8
run: autopep8 --in-place --aggressive --aggressive --max-line-length 180 .
run: autopep8 --in-place --aggressive --aggressive --recursive . --max-line-length 180
- name: Check for changes
run: |
if [[ `git status --porcelain` ]]; then
Expand All @@ -34,10 +34,9 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Auto style code with autopep8"
exit 1
git push
else
echo "No changes detected."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit dec5d0b

Please sign in to comment.