Skip to content

Change ruff and add github action #1

Change ruff and add github action

Change ruff and add github action #1

Workflow file for this run

name: ruff_push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: |
python -m pip install --upgrade pip
pip install ruff
- run: ruff check --output-format=github .
- name: If needed, commit ruff changes to a new pull request
if: failure()
run: |
ruff check --output-format=github --fix .
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -am "fixup! Format Python code with ruff push"
git push --force origin HEAD:$GITHUB_REF