Skip to content

Commit 13073cb

Browse files
committed
docs: clarify path filters for git submodule changes
Path filters in `on.<push|pull_request|pull_request_target>.<paths|paths-ignore>` are compared against the parent repository's diff, which records a submodule as a single entry at the submodule's own path. Filtering on a path inside the submodule therefore never matches, because the parent repository does not track those paths.
1 parent 0b8c768 commit 13073cb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎content/actions/reference/workflows-and-actions/workflow-syntax.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ on:
175175
### Git diff comparisons
176176

177177
{% data reusables.actions.workflows.triggering-a-workflow-paths5 %}
178+
> [!NOTE]
179+
> **Changes to files in a git submodule:** For {% data variables.product.prodname_actions %} to detect changes to files inside a git submodule, filter on the path to the top-level submodule itself, not on paths within the submodule. For example, if a submodule is checked out at `submodules/my-library`, use `paths: - submodules/my-library/**`. The paths to individual files inside the submodule are not tracked by the parent repository's workflow filters.
178180

179181
## `on.schedule`
180182

0 commit comments

Comments
 (0)