Merge pull request #173 from oleole39/patch-2 #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check / auto apply Black | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
black: | |
name: Check / auto apply black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check files using the black formatter | |
uses: psf/black@stable | |
id: black | |
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" | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: ":art: Format Python code with Black" | |
commit_user_name: yunohost-bot | |
commit_user_email: [email protected] | |
commit_author: 'yunohost-bot <[email protected]>' |