Skip to content

Commit e4cc754

Browse files
authored
Merge pull request #1393 from NeuralEnsemble/black-formatting-action
Black formatting: Split check and apply steps
2 parents 7b678a0 + 5a399fd commit e4cc754

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/black-formatting.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ jobs:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
1414

15-
- name: Check and apply black formatting
15+
- name: Check black formatting
1616
id: black-check
1717
uses: psf/black@stable
1818
with:
1919
options: "--check --verbose"
2020
continue-on-error: true
2121

22+
- name: Apply black formatting
23+
id: black-apply
24+
uses: psf/black@stable
25+
if : ${{ steps.black-check.outcome == 'failure' }}
26+
with:
27+
options: "--verbose"
28+
2229
- name: Create PR
2330
uses: peter-evans/create-pull-request@v5
2431
if : ${{ steps.black-check.outcome == 'failure' }}

0 commit comments

Comments
 (0)