Add comments #23
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
# Python black lint workflow | |
# Github: https://www.github.com/0x4248/workflows | |
# By: 0x4248 | |
name: Format python with black | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
python-black: | |
name: Python Black | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black | |
- name: Git pull | |
run: | | |
git pull | |
- name: Format with Black | |
run: | | |
black . | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Format python code with black" | |
file_pattern: "*.py" |