Skip to content

Commit 6781315

Browse files
committed
Add GH Action for black
1 parent f1cc2f4 commit 6781315

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/format.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: black-action
2+
on: [push, pull_request]
3+
jobs:
4+
linter_name:
5+
name: Run black formatter
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: Check files using the black formatter
10+
uses: rickstaa/action-black@v1
11+
id: action_black
12+
with:
13+
black_args: "polypomo"
14+
- name: Annotate diff changes using reviewdog
15+
if: steps.action_black.outputs.is_formatted == 'true'
16+
uses: reviewdog/action-suggester@v1
17+
with:
18+
tool_name: blackfmt

0 commit comments

Comments
 (0)