Interview Prep/CI/CD/GitHub Actions

A workflow must only run when files in `services/api/` change.

BeginnerScenarioGitHub Actions
Answer

Situation read → Path filtering.

What I'd do →

on:
  pull_request:
    paths: ['services/api/**', '.github/workflows/api.yml']

If the check is a required status check, a skipped workflow stays "pending", so use a small always-run job or a path filter action such as dorny/paths-filter inside one workflow.

Why → Required checks and path filters conflict, which is a common surprise.

Interview tip → Mention the pending-required-check pitfall.

All CI/CD questions

More on GitHub Actions