diff --git a/README.md b/README.md
index b19b4b3..394e7a8 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,8 @@ Verify that certain files or directories did or did not change during the workfl
| Input | type | required | default | description |
|:-------------:|:-----------:|:--------------:|:-----------------------------:|:--------------------------:|
| token | `string` | `true` | `${{ github.token }}`
| [GITHUB\_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)
or a repo scoped
[Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
-| files | `string[]` OR `string` | `true` | | Check for uncommited changes
using only
these list of file(s) |
+| files | `string[]` OR `string` | `true` | | Check for uncommited changes
using only
these list of file(s) |
+| autocrlf | `string` | `true` | `input` | Modify the [core.autocrlf](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf)
setting possible values
(true, false, input). |
## Outputs
diff --git a/action.yml b/action.yml
index e0f2d9c..5f3e1d0 100644
--- a/action.yml
+++ b/action.yml
@@ -9,6 +9,10 @@ inputs:
files:
description: List of files to check for changes.
required: true
+ autocrlf:
+ description: Modify the core.autocrlf setting possible values (true, false, input)
+ default: 'input'
+ required: true
outputs:
files_changed:
@@ -33,6 +37,7 @@ runs:
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_TOKEN: ${{ inputs.token }}
INPUT_FILES: ${{ inputs.files }}
+ INPUT_AUTO_CRLF: ${{ inputs.autocrlf }}
branding:
icon: file-text
diff --git a/entrypoint.sh b/entrypoint.sh
index 0b82936..3bbc0fe 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -2,11 +2,7 @@
set -e
-if [[ "$PLATFORM" == 'Windows' ]]; then
- git config --local core.autocrlf true
-else
- git config --local core.autocrlf input
-fi
+git config --local core.autocrlf "$INPUT_AUTO_CRLF"
CHANGED_FILES=()