From 38c23c7fa67b822849e130e80fd49b5700a8bc78 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Wed, 18 Sep 2024 00:47:20 +0100 Subject: [PATCH] :wrench: Implement Ruff as check instead of Black creating a commit --- .github/workflows/format-python.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/format-python.yml b/.github/workflows/format-python.yml index f5f84e1..71c8ed9 100644 --- a/.github/workflows/format-python.yml +++ b/.github/workflows/format-python.yml @@ -1,23 +1,13 @@ -name: Format Python +name: Ensure formatted code on: pull_request: types: [ opened, edited, reopened, synchronize, ready_for_review ] workflow_dispatch: jobs: - format: + format_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - - name: Format code with black - run: | - pip install black - black --line-length 120 . - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: "Formatted code with black --line-length 120" - add: "." + changed-files: 'true'