instruction: How do you create a custom composite action in GitHub Actions?
output: About custom actions - GitHub Docs Skip to main content GitHub Docs Version: Free, Pro, &amp; Team Search or ask Copilot Search or ask Copilot Select language: current language is English Search or ask Copilot Search or ask Copilot Open menu Open Sidebar GitHub Actions / Concepts / Workflows and actions / Custom actions Home GitHub Actions Get started Quickstart Understand GitHub Actions Continuous integration Continuous deployment Actions vs Apps Concepts Workflows and actions Workflows Variables Contexts Expressions Reusable workflows Custom actions Deployment environments Concurrency Workflow artifacts Dependency caching Notifications for workflow runs Runners GitHub-hosted runners Larger runners Self-hosted runners Private networking Runner groups Runner scale sets Actions Runner Controller Support for ARC Security Secrets GITHUB_TOKEN OpenID Connect Artifact attestations Script injections Compromised runners Kubernetes admissions controller Metrics Billing and usage How-tos Write workflows Use workflow templates Choose when workflows run Trigger a workflow Control jobs with conditions Control workflow concurrency Choose where workflows run Choose the runner for a job Run jobs in a container Choose what workflows do Use jobs Find and customize actions Use GitHub CLI Add scripts Use secrets Use variables Pass job outputs Set default values for jobs Deploy to environment Run job variations Reuse automations Reuse workflows Create workflow templates Share across private repositories Share with your organization Secure your work Use artifact attestations Use artifact attestations Increase security rating Enforce artifact attestations Verify attestations offline Manage attestations Security harden deployments OIDC in AWS OIDC in Azure OIDC in Google Cloud Platform OIDC in HashiCorp Vault OIDC in JFrog OIDC in PyPI OIDC in cloud providers OIDC with reusable workflows Deploy Configure and manage deployments Control deployments View deployment history Manage environments Review deployments Create custom protection rules Configure custom protection rules Deploy to third-party platforms Node.js to Azure App Service Python to Azure App Service Java to Azure App Service .NET to Azure App Service PHP to Azure App Service Docker to Azure App Service Azure Static Web App Azure Kubernetes Service Amazon Elastic Container Service Google Kubernetes Engine Sign Xcode applications Create and publish actions Manage custom actions Create a CLI action Set exit codes Publish in GitHub Marketplace Release and maintain actions Manage workflow runs Manually run a workflow Re-run workflows and jobs Cancel a workflow run Disable and enable workflows Skip workflow runs Delete a workflow run Download workflow artifacts Remove workflow artifacts Manage caches Approve runs from forks Manage runners GitHub-hosted runners Use GitHub-hosted runners Customize runners View current jobs Connect to a private network Connect with OIDC Connect with WireGuard Self-hosted runners Add runners Run scripts Customize containers Configure the application Use proxy servers Apply labels Use in a workflow Manage access Monitor and troubleshoot Remove runners Larger runners Manage larger runners Control access Use larger runners Monitor workflows Use the visualization graph View workflow run history View job execution time Add a status badge Use workflow run logs Enable debug logging Troubleshoot workflows Administer View metrics Get support Reference Workflows and actions Workflow syntax Events that trigger workflows Workflow commands Variables Expressions Contexts Deployments and environments Dependency caching Reusable workflows Metadata syntax Workflow cancellation Dockerfile support Runners GitHub-hosted runners Larger runners Self-hosted runners Security Secure use Secrets OIDC Limits GitHub Actions Importer Supplemental arguments and settings Custom transformers Tutorials Create an example workflow Build and test code Go Java with Ant Java with Gradle Java with Maven .NET Node.js PowerShell Python Ruby Rust Swift Xamarin apps Authenticate with GITHUB_TOKEN Create actions Create a JavaScript action Create a composite action Publish packages Publish Docker images Publish Java packages with Gradle Publish Java packages with Maven Publish Node.js packages Manage your work Add labels to issues Close inactive issues Add comments with labels Schedule issue creation Store and share data Use containerized services Create a Docker container action Use Docker service containers Create PostgreSQL service containers Create Redis service containers Migrate to GitHub Actions Automated migrations Use GitHub Actions Importer Azure DevOps migration Bamboo migration Bitbucket Pipelines migration CircleCI migration GitLab migration Jenkins migration Travis CI migration Manual migrations Migrate from Azure Pipelines Migrate from CircleCI Migrate from GitLab CI/CD Migrate from Jenkins Migrate from Travis CI Use Actions Runner Controller Quickstart Authenticate to the API Deploy runner scale sets Use ARC in a workflow Troubleshoot GitHub Actions / Concepts / Workflows and actions / Custom actions About custom actions Actions are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, or use and customize actions shared by the GitHub community. In this article About custom actions Types of actions Next steps About custom actions You can create actions by writing custom 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 actions to use in your workflow or share the actions you build with the GitHub community. To share actions you've built with everyone, your repository must be public. Actions can run directly on a machine or in a Docker container. You can define an action's inputs, outputs, and environment variables. Types of actions Note You can build Docker container, JavaScript, and composite actions. Actions require a metadata file to define the inputs, outputs, and runs configuration for your action. Action metadata files use YAML syntax, and the metadata filename must be either action.yml or action.yaml . The preferred format is action.yml . Type Linux macOS Windows Docker container JavaScript Composite Actions Docker container actions Docker containers package the environment with the GitHub Actions code. This creates a more consistent and reliable unit of work because the consumer of the action does not need to worry about the tools or dependencies. A Docker container allows you to use specific versions of an operating system, dependencies, tools, and code. For actions that must run in a specific environment configuration, Docker is an ideal option because you can customize the operating system and tools. Because of the latency to build and retrieve the container, Docker container actions are slower than JavaScript actions. Docker container actions can only execute on runners with a Linux operating system. Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions. For more information about the requirements of self-hosted runners, see Self-hosted runners . JavaScript actions JavaScript actions can run directly on a runner machine, and separate the action code from the environment used to run the code. Using a JavaScript action simplifies the action code and executes faster than a Docker container action. To ensure your JavaScript actions are compatible with all GitHub-hosted runners (Ubuntu, Windows, and macOS), the packaged JavaScript code you write should be pure JavaScript and not rely on other binaries. JavaScript actions run directly on the runner and use binaries that already exist in the runner image. If you're developing a Node.js project, the GitHub Actions Toolkit provides packages that you can use in your project to speed up development. For more information, see the actions/toolkit repository. Composite Actions A composite action allows you to combine multiple workflow steps within one action. For example, you can use this feature to bundle together multiple run commands into an action, and then have a workflow that executes the bundled commands as a single step using that action. To see an example, check out Creating a composite action . Next steps To learn about how to manage your custom actions, see Managing custom actions . Help and support Get quick answers! Ask Copilot your question. Ask Copilot Did you find what you needed? Yes No Privacy policy Help us make these docs great! All GitHub docs are open source. See something that&#x27;s wrong or unclear? Submit a pull request. Make a contribution Learn how to contribute Still need help? Ask the GitHub community Contact support Legal © 2025 GitHub, Inc. Terms Privacy Status Pricing Expert services Blog