1
0
mirror of synced 2025-12-29 18:00:57 -05:00
Files
docs/data/reusables/actions/workflows/triggering-a-workflow-paths1.md

1.3 KiB

When using the push and pull_request events, you can configure a workflow to run based on what file paths are changed. Path filters are not evaluated for pushes of tags.

Use the paths filter when you want to include file path patterns or when you want to both include and exclude file path patterns. Use the paths-ignore filter when you only want to exclude file path patterns. You cannot use both the paths and paths-ignore filters for the same event in a workflow. If you want to both include and exclude path patterns for a single event, use the paths filter prefixed with the ! character to indicate which paths should be excluded.

Note

The order that you define paths patterns matters:

  • A matching negative pattern (prefixed with !) after a positive match will exclude the path.
  • A matching positive pattern after a negative match will include the path again.

If you define both branches/branches-ignore and paths/paths-ignore, the workflow will only run when both filters are satisfied.

The paths and paths-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see the AUTOTITLE.