Remove Ruff code formatting GitHub Actions workflow

This commit is contained in:
Zakhar Izmaylov
2025-02-08 10:59:50 +03:00
parent f06171b659
commit feaaa108f0
-35
View File
@@ -1,35 +0,0 @@
name: Code Formatting
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff formatter with pyproject.toml
run: ruff format . --config pyproject.toml --exclude main.py,handlers/payments
- name: Check for changes
id: check_changes
run: |
git diff --exit-code || echo "changes_detected=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add .
git commit -m "Auto-format code with Ruff using pyproject.toml"
git push