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
Copy file name to clipboardExpand all lines: README.md
+37-20Lines changed: 37 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,24 @@
1
1
# Paths Changes Filter
2
2
3
-
[Github Action](https://github.com/features/actions) that enables conditional execution of workflow steps and jobs, based on the files modified by pull request, on a feature
3
+
[GitHub Action](https://github.com/features/actions) that enables conditional execution of workflow steps and jobs, based on the files modified by pull request, on a feature
4
4
branch, or by the recently pushed commits.
5
5
6
6
Run slow tasks like integration tests or deployments only for changed components. It saves time and resources, especially in monorepo setups.
- Configure matrix job to run for each folder with changes using `changes` output
@@ -74,7 +78,7 @@ For more scenarios see [examples](#examples) section.
74
78
75
79
For more information, see [CHANGELOG](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
76
80
77
-
# Usage
81
+
## Usage
78
82
79
83
```yaml
80
84
- uses: dorny/paths-filter@v2
@@ -139,26 +143,27 @@ For more information, see [CHANGELOG](https://github.com/dorny/paths-filter/blob
139
143
working-directory: ''
140
144
141
145
# Personal access token used to fetch a list of changed files
142
-
# from Github REST API.
146
+
# from GitHub REST API.
143
147
# It's only used if action is triggered by a pull request event.
144
-
# Github token from workflow context is used as default value.
148
+
# GitHub token from workflow context is used as default value.
145
149
# If an empty string is provided, the action falls back to detect
146
150
# changes using git commands.
147
151
# Default: ${{ github.token }}
148
152
token: ''
149
153
```
150
154
151
155
## Outputs
156
+
152
157
- For each filter, it sets output variable named by the filter to the text:
153
-
- `'true'`- if **any** of changed files matches any of filter rules
154
-
- `'false'`- if **none** of changed files matches any of filter rules
158
+
- `'true'`- if **any** of changed files matches any of filter rules
159
+
- `'false'`- if **none** of changed files matches any of filter rules
155
160
- For each filter, it sets an output variable with the name `${FILTER_NAME}_count` to the count of matching files.
156
161
- If enabled, for each filter it sets an output variable with the name `${FILTER_NAME}_files`. It will contain a list of all files matching the filter.
157
162
- `changes`- JSON array with names of all filters matching any of the changed files.
158
163
159
-
# Examples
164
+
## Examples
160
165
161
-
## Conditional execution
166
+
### Conditional execution
162
167
163
168
<details>
164
169
<summary>Execute <b>step</b> in a workflow job only if some file in a subfolder is changed</summary>
0 commit comments