Skip to content

Commit

Permalink
Merge pull request #5 from JKHarley/main
Browse files Browse the repository at this point in the history
Allow `--dirty` argument
  • Loading branch information
aglipanci authored Mar 18, 2023
2 parents 5c0b1f6 + c412b9a commit 8849e56
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -29,6 +33,7 @@ runs:
- ${{ inputs.verbose-mode }}
- ${{ inputs.config-path }}
- ${{ inputs.preset }}
- ${{ inputs.only-dirty }}
- ${{ inputs.pint-version }}
branding:
icon: 'eye'
Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}
Expand Down

0 comments on commit 8849e56

Please sign in to comment.