diff --git a/README.md b/README.md index f2c9d0c..c04c489 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ jobs: testMode: true configPath: "vendor/my-company/coding-style/pint.json" pintVersion: 1.2.1 + onlyDirty: true ``` ℹ️ Starting from version 2 you can specify the Pint version to be used by specifyling a `pintVersion` in your configuration file. diff --git a/action.yml b/action.yml index 4ff1743..cd2d8b2 100644 --- a/action.yml +++ b/action.yml @@ -17,9 +17,13 @@ inputs: preset: description: "pint preset" required: false + + onlyDirty: + description: "only format changed files" + required: false pintVersion: - description: "larave/pint composer version to install a specific version." + description: "laravel/pint composer version to install a specific version." required: false runs: using: 'docker' @@ -29,6 +33,7 @@ runs: - ${{ inputs.verbose-mode }} - ${{ inputs.config-path }} - ${{ inputs.preset }} + - ${{ inputs.only-dirty }} - ${{ inputs.pint-version }} branding: icon: 'eye' diff --git a/entrypoint.sh b/entrypoint.sh index e3b42ce..b91d408 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -28,6 +28,10 @@ if [[ "${INPUT_PRESET}" ]]; then pint_command+=" --preset ${INPUT_PRESET}" fi +if [[ "${INPUT_ONLYDIRTY}" ]]; then + pint_command+=" --dirty" +fi + echo "Running Command: " "${pint_install_command[@]}" ${pint_install_command[@]}