This project can be used to run Black on every push using Github actions.
For a more detailed installation guide look there
Create a formatter.yml
file in .github/workflows/
.
Paste this code into the file:
on: push
name: Black Python Formatter
jobs:
lint:
name: Black Python Formatter
runs-on: ubuntu-latest
steps:
- name: Black Python Formatter
uses: antoinealb/black-formatter-action@clang9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}