Skip to content
Latchkey

GitHub Actions paths / paths-ignore Filter Not Matching as Expected

A workflow runs (or skips) unexpectedly because paths and paths-ignore are an allow/deny pair you cannot combine for the same event, the globs do not match what you think, or you applied them to an event that ignores them.

What this error means

A push that touches only ignored files still triggers a run, or a change you expected to match the paths filter is skipped, because the filter logic or glob did not behave as assumed.

.github/workflows/ci.yml
on:
  push:
    paths: ['src/**']
    paths-ignore: ['**.md']   # combining both for one event is ambiguous

Common causes

paths and paths-ignore combined

For a single event you should use one or the other. paths is an allowlist; paths-ignore is a denylist. Mixing them for the same event leads to confusing behavior.

Glob does not match the changes

Path filters use glob patterns. A pattern like src/* does not match nested files; you need src/** for recursive matches.

Filter applied to an unsupported event

paths/paths-ignore only apply to push and pull_request. They have no effect on schedule, workflow_dispatch, or most other events.

How to fix it

Choose one filter and use recursive globs

Pick paths or paths-ignore per event, and use ** for recursive directory matches.

.github/workflows/ci.yml
on:
  push:
    paths:
      - 'src/**'
      - '!src/docs/**'   # negate within paths instead of mixing

Account for filter scope

  1. Remember required checks may stall if a path filter skips the workflow - pair with a passthrough.
  2. Do not expect path filters to gate workflow_dispatch or schedule events.
  3. Test the glob against a representative changed-file set.

How to prevent it

  • Use paths or paths-ignore per event, not both.
  • Prefer ** for recursive matches and negation within paths.
  • Remember filters only apply to push and pull_request.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →