This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
chore(deps): update abatilo/actions-poetry action to v3.0.1 #755
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: Lint | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
- name: Install Black | |
run: pip install black | |
- name: Run black --check . | |
run: black --line-length 120 --check --diff . | |
- name: If needed, commit black changes to the pull request | |
if: failure() | |
run: | | |
black --line-length 120 . | |
git config --global user.name 'autoblack' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git checkout $GITHUB_HEAD_REF | |
git commit -am "fixup: Format Python code with Black" | |
git push |