diff --git a/.github/workflows/pylint.yml b/.github/workflows/auto-format.yml similarity index 52% rename from .github/workflows/pylint.yml rename to .github/workflows/auto-format.yml index 865574e..870aa92 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/auto-format.yml @@ -1,4 +1,4 @@ -name: Pylint +name: AutoFormat on: [push] @@ -17,14 +17,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint - - name: Install Autopep8 - run: pip install autopep8 - - name: Lint Action - uses: wearerequired/lint-action@v2.3.0 + pip install black + - name: Run Black formatter + run: | + black . --line-length 88 + - name: Commit and push changes + uses: stefanzweifel/git-auto-commit-action@v4 with: - autopep8: true - github_token: ${{ secrets.GITHUB_TOKEN }} - # - name: Analysing the code with pylint - # run: | - # pylint $(git ls-files '*.py') + commit_message: '🤖 Auto-formatted code with Black' + commit_user_name: GitHub Action + commit_user_email: action@github.com + branch: ${{ github.ref }}