A monorepo workflow should run only when files under 'backend/**' change on push. Which trigger configuration implements that path filter?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Use on.push.paths with glob patterns. directories and only are not valid push filter keys; path is not a top-level on event in GitHub Actions.
Full explanation below image
Full Explanation
GitHub Actions supports paths and paths-ignore under push and pull_request to limit workflow runs based on changed files. on.push.paths: ['backend/**'] runs the workflow when at least one changed file matches the glob. This saves minutes in monorepos. directories and only are not valid keys for this filter. A top-level on.path event does not exist. Related filters include branches, tags, and types for activity events. Caution: path filters interact with scheduled or manual workflows differently because those events may not have the same changed-file semantics — path filters apply to push and pull_request change sets. Also consider paths-ignore when you want to exclude docs or generated files from triggering CI.