From 5bbd60d3c1ff207668162884d284592b9cf0af9f Mon Sep 17 00:00:00 2001 From: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com> Date: Sat, 9 Nov 2024 12:50:04 -0500 Subject: [PATCH] Update run-djlint.yml --- .github/workflows/run-djlint.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-djlint.yml b/.github/workflows/run-djlint.yml index 7740d3c34..f3ae0a15b 100644 --- a/.github/workflows/run-djlint.yml +++ b/.github/workflows/run-djlint.yml @@ -1,4 +1,4 @@ -name: Run djlint +name: Run djlint and Ruff on: workflow_dispatch: @@ -7,7 +7,7 @@ permissions: contents: write jobs: - run-djlint: + lint-and-fix: runs-on: ubuntu-latest steps: @@ -19,11 +19,11 @@ jobs: with: python-version: '3.11' - - name: Install djlint + - name: Install djlint and ruff run: | python -m venv venv source venv/bin/activate - pip install djlint + pip install djlint ruff - name: Run djlint run: | @@ -31,10 +31,15 @@ jobs: files_to_check=$(find company/templates website/templates -type f -name "*.html") djlint --reformat $files_to_check || true + - name: Run Ruff + run: | + source venv/bin/activate + ruff check . --fix || true + - name: Commit changes run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" git add . - git commit -m "Apply djlint fixes" || echo "No changes to commit" - git push origin ${{ github.head_ref }} \ No newline at end of file + git commit -m "Apply djlint and Ruff fixes" || echo "No changes to commit" + git push origin ${{ github.head_ref }}