Paths with only negative value doesn't trigger the workflow

I’ve created a workflow which should not be triggered when specified files are included in change. Here’s the condition.

on:
  pull_request:
    paths:
      - '!README.md'
      - '!workflow.png'

However, the workflow is not triggered, though the change contains many other files.
After some investigation, the workflow is triggered correctly in the following cases.

  • Remove the entire paths field
on:
  pull_request:
  • Specify positive value on paths
on:
  pull_request:
    paths:
      - 'main.py'

I read the document again and couldn’t find the restriction about the pattern under paths .
But maybe we can’t specify only negative patterns under paths ?

If you want to only specify ignore patterns, you can use paths-ignore instead:

on:
  pull_request:
    paths-ignore:
      - 'README.md'
      - 'workflow.png'