Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

Where must workflow files live, and does the file extension matter?

BeginnerConceptWorkflow Anatomy & Execution Model
Answer

Directly in .github/workflows/ of the repository, with a .yml or .yaml extension. Subdirectories are not scanned (so .github/workflows/ci/build.yml never runs). Local composite actions conventionally live in .github/actions/<name>/action.yml, and they are not workflows. Reusable workflows must also sit directly in .github/workflows/.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model