Quickstart: Run steps conditionally based on changed files
masterUse dorny/paths-filter@v4 to detect file changes and set an output variable. You can then use this output in a GitHub Actions if conditional to run specific steps or jobs only when certain files (e.g., in a src folder) have been modified.
- uses: dorny/paths-filter@v4
id: changes
with:
filters: |
src:
- 'src/**'
# run only if some file in 'src' folder was changed
- if: steps.changes.outputs.src == 'true'
run: ...