GitHub Actions Tutorial — Custom Actions

1 minute read

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.yml metadata files
  • Publishing actions to the GitHub Marketplace

Topics Covered

1. Composite Actions

Bundle multiple steps into a single reusable action using YAML.

Read: Composite Actions →


2. JavaScript Actions

Build actions in Node.js with the official @actions/core toolkit.

Read: JavaScript Actions →


3. Docker Actions

Package actions in Docker containers for custom languages and tools.

Read: Docker Actions →


4. Action Metadata

The action.yml file — inputs, outputs, branding, and runs configuration.

Read: Action Metadata →


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.

Practice Exercises →


← Previous: Chapter 10: Reusable Workflows

Next: Chapter 12: Self-Hosted Runners →

Updated: