π Fix: remove flake8 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Formatter | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Formatter: | |
name: Formatter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
repository: Zerohertz/Algorithm | |
token: ${{ secrets.GH_TOKEN }} | |
path: ./ | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install isort & autopep8 | |
run: | | |
pip install isort autopep8 | |
- name: Check & Push | |
run: | | |
isort . | |
autopep8 --recursive --in-place --aggressive . | |
if [[ -n $(git diff) ]]; then | |
echo "Code changes detected." | |
git config --global user.name "Zerohertz" | |
git config --global user.email "ohg3417@gmail.com" | |
git config --global credential.helper store | |
git add . | |
git commit -m ":art: Style: Format" | |
git push | |
else | |
echo "No code changes." | |
fi |