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/.
More on Workflow Anatomy & Execution Model
Define workflow, run, job, step, action and runner in one line each.BeginnerWhat is the minimum valid workflow file?BeginnerWhich version of the workflow file does GitHub use for a given run?IntermediateWhat does a GitHub-hosted runner give you at the start of a job?BeginnerShould you use `ubuntu-latest` or `ubuntu-24.04`?BeginnerWhat runner images and architectures can you choose from?Intermediate