mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-05-12 20:50:14 +02:00
First try at implementing only-apply-to-changed-files
This commit is contained in:
@@ -16,12 +16,20 @@ inputs:
|
||||
description: 'The version of ruff to use, e.g. "0.0.259"'
|
||||
required: false
|
||||
default: ""
|
||||
changed-files:
|
||||
description: 'Whether to only run ruff on changed files. Default: false'
|
||||
required: false
|
||||
default: "false"
|
||||
branding:
|
||||
color: "black"
|
||||
icon: "code"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
if: ${{ inputs.changed-files == 'true' }}
|
||||
uses: tj-actions/changed-files@v44
|
||||
- run: |
|
||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||
python $GITHUB_ACTION_PATH/action/main.py
|
||||
@@ -33,5 +41,6 @@ runs:
|
||||
INPUT_ARGS: ${{ inputs.args }}
|
||||
INPUT_SRC: ${{ inputs.src }}
|
||||
INPUT_VERSION: ${{ inputs.version }}
|
||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
pythonioencoding: utf-8
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user