summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ruff-lint.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/ruff-lint.yml b/.github/workflows/ruff-lint.yml
index 7f93ccd..390086c 100644
--- a/.github/workflows/ruff-lint.yml
+++ b/.github/workflows/ruff-lint.yml
@@ -17,18 +17,22 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- - name: Setup Python
- uses: actions/setup-python@v5
+ - name: Get changed py files
+ id: changed-py-files
+ uses: tj-actions/changed-files@v44
with:
- python-version: '3.11'
+ files: |
+ **.py
- name: Ruff Check
+ if: steps.changed-py-files.outputs.any_changed == 'true'
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
with:
args: check
changed-files: 'true'
- name: Ruff Format
+ if: steps.changed-py-files.outputs.any_changed == 'true'
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
if: always()
with: