mirror of
https://github.com/dorny/paths-filter.git
synced 2025-01-28 09:15:40 +00:00
66 lines
3.2 KiB
YAML
66 lines
3.2 KiB
YAML
name: 'Paths Changes Filter And Diff Stat'
|
|
description: 'Execute your workflow steps only if relevant files are modified.'
|
|
author: 'Michal Dorner <dorner.michal@gmail.com>, Boris Lykah<lykahb@gmail.com>'
|
|
inputs:
|
|
token:
|
|
description: 'GitHub Access Token'
|
|
required: false
|
|
default: ${{ github.token }}
|
|
working-directory:
|
|
description: 'Relative path under $GITHUB_WORKSPACE where the repository was checked out.'
|
|
required: false
|
|
ref:
|
|
description: |
|
|
Git reference (e.g. branch name) from which the changes will be detected.
|
|
This option is ignored if action is triggered by pull_request event.
|
|
required: false
|
|
base:
|
|
description: |
|
|
Git reference (e.g. branch name) against which the changes will be detected. Defaults to repository default branch (e.g. master).
|
|
If it references same branch it was pushed to, changes are detected against the most recent commit before the push.
|
|
This option is ignored if action is triggered by pull_request event.
|
|
required: false
|
|
filters:
|
|
description: 'Path to the configuration file or YAML string with filters definition'
|
|
required: true
|
|
list-files:
|
|
description: |
|
|
Enables listing of files matching the filter:
|
|
'none' - Disables listing of matching files (default).
|
|
'csv' - Coma separated list of filenames.
|
|
If needed it uses double quotes to wrap filename with unsafe characters.
|
|
'json' - Serialized as JSON array.
|
|
'shell' - Space delimited list usable as command line argument list in linux shell.
|
|
If needed it uses single or double quotes to wrap filename with unsafe characters.
|
|
'escape'- Space delimited list usable as command line argument list in linux shell.
|
|
Backslash escapes every potentially unsafe character.
|
|
required: false
|
|
default: none
|
|
stat:
|
|
description: |
|
|
Enables listing of that enables output of the file change statistics per filter, similar to `git diff --shortstat`.
|
|
If some changes do not match any filter, the output includes an additional entry with the filter name 'other'.
|
|
'none' - Disables listing of stats (default).
|
|
'csv' - Coma separated list that has name of filter, count of additions, count of deletions, count of changed files.
|
|
If needed it uses double quotes to wrap name of filter with unsafe characters. For example, `"some filter",12,7,2`.
|
|
'json' - Serialized as JSON object where the filter names are keys. For example, `{"some filter": {"additionCount": 12, "deletionCount": 7, "fileCount": 2}}`
|
|
required: false
|
|
default: none
|
|
initial-fetch-depth:
|
|
description: |
|
|
How many commits are initially fetched from base branch.
|
|
If needed, each subsequent fetch doubles the previously requested number of commits
|
|
until the merge-base is found or there are no more commits in the history.
|
|
This option takes effect only when changes are detected using git against different base branch.
|
|
required: false
|
|
default: '100'
|
|
outputs:
|
|
changes:
|
|
description: JSON array with names of all filters matching any of changed files
|
|
runs:
|
|
using: 'node20'
|
|
main: 'dist/index.js'
|
|
branding:
|
|
color: blue
|
|
icon: filter
|