Add dependabot #9
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: Style | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
auto-format: | |
name: Lint & format code with ruff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- run: pip install ruff | |
- name: Lint & format code with ruff and commit any changes | |
run: | | |
ruff check --output-format=github --fix . | |
ruff format . | |
git config --global user.name 'Auto ruff formatter' | |
git config --global user.email 'claudiugeorgiu@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git checkout ${GITHUB_REF#refs/heads/} | |
git diff --quiet || git commit -am "Format code with ruff [auto]" && git push |