Skip to content

Merge pull request #26 from SFI-Visual-Intelligence/fix-main #8

Merge pull request #26 from SFI-Visual-Intelligence/fix-main

Merge pull request #26 from SFI-Visual-Intelligence/fix-main #8

Workflow file for this run

name: Format
on:
push:
branches:
- main
paths:
- 'utils/**'
pull_request:
branches:
- main
paths:
- 'utils/**'
jobs:
format:
name: Run Ruff and isort
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install ruff isort
- name: Run Ruff formatter
run: |
ruff format utils/
- name: Run isort
run: |
isort utils/
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add utils/
git commit -m "Auto-format: Applied ruff format and isort" || exit 0
git push