GitHub Actions Tutorial — Custom Actions
Chapter 11 — Custom Actions
Custom actions let you encapsulate reusable logic into a single uses: step. While reusable workflows operate at the job level, custom actions operate at the step level — they’re smaller building blocks that can be shared across workflows and organizations.
GitHub supports three types: composite (YAML-based), JavaScript (Node.js), and Docker (container-based). Each has trade-offs in complexity, performance, and portability.
What You’ll Learn
- Creating composite actions from YAML steps
- Building JavaScript actions with the Actions toolkit
- Packaging Docker-based actions for custom runtimes
- Writing
action.ymlmetadata files - Publishing actions to the GitHub Marketplace
Topics Covered
1. Composite Actions
Bundle multiple steps into a single reusable action using YAML.
2. JavaScript Actions
Build actions in Node.js with the official @actions/core toolkit.
3. Docker Actions
Package actions in Docker containers for custom languages and tools.
4. Action Metadata
The action.yml file — inputs, outputs, branding, and runs configuration.
5. Publishing to Marketplace
Share your actions with the world on the GitHub Actions Marketplace.
Read: Publishing to Marketplace →
Practice
Test your understanding with hands-on exercises.
← Previous: Chapter 10: Reusable Workflows
Next: Chapter 12: Self-Hosted Runners →