CI/CD & GitHub Actions (50 Qs)•Part 1: CI/CD Fundamentals & GitHub Actions Core (Junior / Entry-Level)
What is the difference between Composite Actions and Reusable Workflows?
junior LevelMost AskedState ManagementCI/CD & DevOps
In Simple Words: Both promote DRY (Don't Repeat Yourself) automation across repositories:
- Composite Action: Combines multiple shell steps into a single reusable action (
action.yml). It runs inside an existing job on the host runner. - Reusable Workflow (
workflow_call): An entire standalone workflow (.github/workflows/*.yml) containing multiple jobs, its own runner environments, and secrets that can be invoked by caller workflows.
| Feature | Composite Action | Reusable Workflow |
|---|---|---|
| File Type | action.yml | .github/workflows/name.yml |
| Trigger | Executed as a step via uses: | Called as a job via uses: with on: workflow_call |
| Can Define Multiple Jobs? | No (steps only) | Yes (full multi-job pipelines) |
| Secrets Access | Must pass secrets as inputs | Can inherit via secrets: inherit |