fix: commit issues in ruff and black #14
Workflow file for this run
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: Ruff check and auto-fix | |
on: push | |
permissions: | |
contents: write # Allows auto-fix commits to be made | |
jobs: | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: actions/setup-python@v2 | |
- uses: chartboost/ruff-action@v1 | |
with: | |
args: check --fix --show-fixes --output-format=github | |
src: tool | |
continue-on-error: true | |
- name: commit changes | |
if: steps.ruff.outcome != 'success' | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' | |
git commit -am "style: lint Python code with Ruff" | |
git push |