You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend filter syntax with optional specification of file status: add, modified, deleted (dorny#22)
* Add support for specification of change type (add,modified,delete)
* Use NULL as separator in git-diff command output
* Improve PR test workflow
* Fix the workflow file
Copy file name to clipboardexpand all lines: README.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,10 @@ Supported workflows:
20
20
## Usage
21
21
22
22
Filter rules are defined using YAML format.
23
-
Each filter rule is a list of [glob expressions](https://github.com/isaacs/minimatch).
24
-
Corresponding output variable will be created to indicate if there's a changed file matching any of the rule glob expressions.
23
+
Each filter has a name and set of rules.
24
+
Rule is a [glob expressions](https://github.com/isaacs/minimatch).
25
+
Optionally you specify if the file should be added, modified or deleted to be matched.
26
+
For each filter there will be corresponding output variable to indicate if there's a changed file matching any of the rules.
25
27
Output variables can be later used in the `if` clause to conditionally run specific steps.
26
28
27
29
### Inputs
@@ -30,7 +32,7 @@ Output variables can be later used in the `if` clause to conditionally run speci
30
32
-**`base`**: Git reference (e.g. branch name) against which the changes will be detected. Defaults to repository default branch (e.g. master).
31
33
If it references same branch it was pushed to, changes are detected against the most recent commit before the push.
32
34
This option is ignored if action is triggered by *pull_request* event.
33
-
-**`filters`**: Path to the configuration file or directly embedded string in YAML format. Filter configuration is a dictionary, where keys specifies rule names and values are lists of file path patterns.
35
+
-**`filters`**: Path to the configuration file or directly embedded string in YAML format.
34
36
35
37
### Outputs
36
38
- For each rule it sets output variable named by the rule to text:
@@ -41,6 +43,7 @@ Output variables can be later used in the `if` clause to conditionally run speci
41
43
- minimatch [dot](https://www.npmjs.com/package/minimatch#dot) option is set to true - therefore
42
44
globbing will match also paths where file or folder name starts with a dot.
43
45
- You can use YAML anchors to reuse path expression(s) inside another rule. See example in the tests.
46
+
- It's recommended to put quote your path expressions with `'` or `"`. Otherwise you will get an error if it starts with `*`.
44
47
- If changes are detected against the previous commit and there is none (i.e. first push of a new branch), all filter rules will report changed files.
45
48
- You can use `base: ${{ github.ref }}` to configure change detection against previous commit for every branch you create.
0 commit comments