Reusable steps inside a job
A composite action is a YAML file that bundles multiple steps into a single uses:-able unit. Where a reusable workflow is a whole job running on its own runner, a composite action is just a sequence of steps that runs inline in the calling job's runner.
When to pick which
- Reusable workflow — when you want a whole job (separate runner, parallel, with its own permissions). Best for 'run our standard test suite' or 'do our standard deploy'.
- Composite action — when you want a repeatable sequence of steps within an existing job. Best for 'set up our weird Python env' or 'build and tag our Docker image'.
Anatomy
A composite action lives at .github/actions/<name>/action.yml (local) or in its own repo (shared). The file declares runs.using: composite and a list of steps.