Introduction

Completed

GitHub Actions allow you to create individual, custom actions by writing code that interacts with your repository in any way you'd like, including integrating with GitHub's APIs and any publicly available third-party API. For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code.

You can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. To share actions you've built with the community, your repository must be public. Actions can run directly on compute resources (such as virtual machines) or in Docker containers. You can also define an action's inputs, outputs, and environment variables.

In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace.

Learning objectives

In this module, you will:

  • Identify the metadata and syntax needed to create custom GitHub actions.
  • Learn best practices to publish a private or public GitHub action.
  • Consume actions within a workflow file.
  • Create custom JavaScript based actions.
  • Publish a newly created action to the GitHub Marketplace.

Prerequisites

This module assumes you have basic familiarity with GitHub Actions and workflows. You'll also need: