13
0
Fork 0
mirror of https://github.com/dorny/paths-filter.git synced 2026-07-04 14:29:31 +00:00
This commit is contained in:
Diogo Kiss 2026-04-13 16:20:28 +00:00 committed by GitHub
commit 3a17995bc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 85 additions and 12 deletions

View file

@ -151,6 +151,13 @@ For more information, see [CHANGELOG](https://github.com/dorny/paths-filter/blob
# Default: none
list-files: ''
# Enables writing the lists of matching files to a corresponding file.
# If set, the action will create the specified file with the list of matching files.
# The file will be written in the format specified by the `list-files` option and named
# after the filter. The path to the file will be relative to the working directory and
# exported as an output variable named `<filter-name>_files_path`.
write-to-files: ''
# Relative path under $GITHUB_WORKSPACE where the repository was checked out.
working-directory: ''
@ -520,6 +527,37 @@ jobs:
</details>
<details>
<summary>Handle large change sets (2000+ files)</summary>
```yaml
- uses: dorny/paths-filter@v3
id: changed
with:
# Enable writing the files matching each filter to the disk in addition to the output '<filter_name>_files'.
# The path for each filter's file is output in the format '<filter_name>_files_path'.
write-to-files: true
list-files: json
filters: |
content:
- 'content/**'
- name: List changed directories relative to the base directory
shell: bash
env:
BASE_DIR: ${{ inputs.base-directory }}
CHANGED_CONTENT_FILES_PATH: ${{ steps.changed.outputs.content_files_path }}
run: |
CHANGED_CONTENT_DIRECTORIES=$(cat "${CHANGED_CONTENT_FILES_PATH}" | xargs -n1 realpath -m --relative-to=${BASE_DIR} | cut -f1 -d / | sort -u)
for d in $CHANGED_CONTENT_DIRECTORIES
do
echo "Content directory change detected: ${d}"
done
```
</details>
### Custom processing of changed files
<details>