Skip to content

Commit

Permalink
CI: Automate black
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Nov 23, 2022
1 parent 7bf110f commit 490d3cd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/black.yaml
@@ -0,0 +1,34 @@
name: black

on:
push:
paths:
- '**.py'

defaults:
run:
shell: bash

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install black
run: |
python -m pip install --upgrade pip
pip install black
- name: Version
run: |
python --version
black --version
- name: Run black
run: |
black markdown_include
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Apply black changes"
2 changes: 2 additions & 0 deletions pyproject.toml
Expand Up @@ -40,3 +40,5 @@ packages = ["markdown_include"]

[tool.setuptools.dynamic]
version = { attr = "setuptools_scm.get_version" }

[tool.black]

0 comments on commit 490d3cd

Please sign in to comment.