A path filter and the required check that never runs

A workflow with a path filter does not run when nothing matched, and a required status check that never runs blocks the pull request forever.

on:
  pull_request:
    paths: ['packages/api/**']

# a PR touching only docs never triggers this, so the
# required check 'api / test' is pending indefinitely.

# the fix: a second workflow with the inverse filter,
# reporting the same check name as a success
name: api
on:
  pull_request:
    paths-ignore: ['packages/api/**']
jobs:
  test:
    runs-on: ubuntu-22.04
    steps: [{ run: 'echo "no api changes"' }]

The duplicate-workflow trick is ugly and is the documented answer, because branch protection has no concept of a check that is legitimately absent. The alternative is not making the check required, which gives up the guarantee entirely — so this is one of the places where the platform’s model and the desired policy simply do not meet.