What are the three kinds of custom action and how do you choose?
BeginnerConceptCustom Actions & Reusable Workflows
Answer
- Composite (
runs.using: composite): a list of steps, any language viarun, can call other actions. Best for gluing existing tools. - JavaScript (
runs.using: node24): runs directly on the runner, fastest startup, cross-platform, full toolkit (@actions/core,@actions/github). Best for logic and API calls. - Docker container (
runs.using: docker): any language and dependencies in an image, but Linux runners only and slower (image build or pull each run).
More on Custom Actions & Reusable Workflows
Write a minimal composite action that installs Node and dependencies with caching.IntermediateWhat can a composite action not do compared to a job?IntermediateHow do you pass outputs out of a composite action?IntermediateWhat does `action.yml` contain for a JavaScript action?IntermediateWhy must a JavaScript action commit its `dist/` or `node_modules`?IntermediateShow the core of a JavaScript action using the toolkit.Advanced