Skip to content

Commit

Permalink
Simplify autoblack action
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Oct 23, 2024
1 parent 20fdf51 commit 7815b7b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/autoblack.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Check / auto apply Black

on:
push:
branches:
- master
branches:
- master

jobs:
black:
name: Check / auto apply black
Expand All @@ -15,15 +17,8 @@ jobs:
with:
options: "."
continue-on-error: true
- shell: pwsh
id: check_files_changed
run: |
# Diff HEAD with the previous commit
$diff = git diff
$HasDiff = $diff.Length -gt 0
Write-Host "::set-output name=files_changed::$HasDiff"

- name: Create Pull Request
if: steps.check_files_changed.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 7815b7b

Please sign in to comment.