name: Format Code on: push: paths: - '**.py' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements-lint.txt - name: Code Format Check with Black run: | black --verbose . - name: Commit Formated Code uses: EndBug/add-and-commit@v9 with: message: "Format code with black" # Ref https://git-scm.com/docs/git-add#_examples add: './*.py'