Skip to content

bump action versions #18

bump action versions

bump action versions #18

Workflow file for this run

name: Lint and Format
on: [push, pull_request]
permissions:
contents: write
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install isort black ruff
- name: Run isort
run: |
isort .
- name: Run black
run: |
black .
- name: Run ruff
run: |
ruff check . --fix
- name: Commit and push changes if needed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet; then
git add .
git commit -m "Format code with isort, black, and ruff [skip ci]"
git push
else
echo "No changes to commit."
fi