feat: Add support for non ascii filenames (#473)
* feat: Add support for non ascii filenames Closes: #437 * Update action.yml * Update README.md * Create test-è.txt * Update test.yml * Update README.md * Update action.yml * Update entrypoint.sh * Update entrypoint.sh * Update entrypoint.sh
This commit is contained in:
parent
059617dc0d
commit
a6d456f542
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -231,6 +231,16 @@ jobs:
|
|||||||
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with quotepath disabled
|
||||||
|
id: changed-files-quotepath
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
quotepath: "false"
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with forward slash separator
|
- name: Run changed-files with forward slash separator
|
||||||
id: changed-files-forward-slash
|
id: changed-files-forward-slash
|
||||||
uses: ./
|
uses: ./
|
||||||
|
@ -140,6 +140,7 @@ Support this project with a :star:
|
|||||||
| path | `string` | `false` | | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
| path | `string` | `false` | | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
||||||
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha` <br> (Defaults to the last commit <br> on the target branch for Pull requests <br> or the previous commit <br> on the current branch <br> for push events). <br /> NOTE: This requires <br /> `fetch-depth: 0` <br /> with `actions/checkout@v2` |
|
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha` <br> (Defaults to the last commit <br> on the target branch for Pull requests <br> or the previous commit <br> on the current branch <br> for push events). <br /> NOTE: This requires <br /> `fetch-depth: 0` <br /> with `actions/checkout@v2` |
|
||||||
| use\_fork\_point | `string` | `false` | `false` | Finds best common ancestor <br /> between two commits <br /> to use in a three-way merge <br /> as the `base_sha` <br /> See: [git merge-base](https://git-scm.com/docs/git-merge-base#Documentation/git-merge-base.txt---fork-point). <br> NOTE: This pulls the entire commit history of the base branch |
|
| use\_fork\_point | `string` | `false` | `false` | Finds best common ancestor <br /> between two commits <br /> to use in a three-way merge <br /> as the `base_sha` <br /> See: [git merge-base](https://git-scm.com/docs/git-merge-base#Documentation/git-merge-base.txt---fork-point). <br> NOTE: This pulls the entire commit history of the base branch |
|
||||||
|
| quotepath | `string` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@ -53,6 +53,10 @@ inputs:
|
|||||||
description: 'Finds best common ancestor between two commits to use in a three-way merge as the base_sha'
|
description: 'Finds best common ancestor between two commits to use in a three-way merge as the base_sha'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
|
quotepath:
|
||||||
|
description: 'Output filenames completely verbatim by setting this to false'
|
||||||
|
default: 'true'
|
||||||
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
added_files:
|
added_files:
|
||||||
@ -177,6 +181,7 @@ runs:
|
|||||||
INPUT_CURRENT_SHA: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
INPUT_CURRENT_SHA: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
||||||
INPUT_TARGET_BRANCH: ${{ steps.changed-files-diff-sha.outputs.target_branch }}
|
INPUT_TARGET_BRANCH: ${{ steps.changed-files-diff-sha.outputs.target_branch }}
|
||||||
INPUT_CURRENT_BRANCH: ${{ steps.changed-files-diff-sha.outputs.current_branch }}
|
INPUT_CURRENT_BRANCH: ${{ steps.changed-files-diff-sha.outputs.current_branch }}
|
||||||
|
INPUT_QUOTEPATH: ${{ inputs.quotepath }}
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: file-text
|
icon: file-text
|
||||||
|
@ -6,6 +6,12 @@ INPUT_SEPARATOR="${INPUT_SEPARATOR//'%'/'%25'}"
|
|||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
|
||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
||||||
|
|
||||||
|
if [[ $INPUT_QUOTEPATH == "false" ]]; then
|
||||||
|
git config --global core.quotepath off
|
||||||
|
else
|
||||||
|
git config --global core.quotepath on
|
||||||
|
fi
|
||||||
|
|
||||||
function get_diff() {
|
function get_diff() {
|
||||||
base="$1"
|
base="$1"
|
||||||
sha="$2"
|
sha="$2"
|
||||||
|
1
test/test-è.txt
Normal file
1
test/test-è.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
This is a test file.
|
Loading…
x
Reference in New Issue
Block a user