What does `action.yml` contain for a JavaScript action?
IntermediateConceptCustom Actions & Reusable Workflows
Answer
name: PR size labeler
description: Labels PRs by changed lines
inputs:
token:
description: GitHub token
default: ${{ github.token }}
outputs:
size:
description: xs, s, m, l, xl
runs:
using: node24
main: dist/index.js
post: dist/cleanup.js # optional
branding:
icon: tag
color: blue
node24 is the current runtime; node20 actions are being phased out and older node12/node16 actions are forced onto newer Node with warnings.
More on Custom Actions & Reusable Workflows
What are the three kinds of custom action and how do you choose?BeginnerWrite 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?IntermediateWhy must a JavaScript action commit its `dist/` or `node_modules`?IntermediateShow the core of a JavaScript action using the toolkit.Advanced