action.yml Metadata Syntax
action.yml is the core configuration file of the plugin, containing information such as the plugin's metadata, inputs and outputs, and runtime environment. Use action.yml to identify and load the plugin.
Full Example
# action.yml Metadata Syntax
name: 'action-demo'
version: '1.0.0'
author: 'XXX'
description: 'Sample Plugin'
inputs:
key_input:
description: 'Single-line input test'
required: true
default: test
outputs:
record_id:
description: "Record ID"
report_url:
description: "Report Link"
runs:
using: 'node16'
main: 'dist/main.js'
post: 'dist/stop.js'
Definition File Format Specifications
| Rule | Description |
|---|---|
| Format | Mandatory YAML format |
| File Name | Mandatory Must be named action.yml, case-sensitive |
Version Number Specifications
The version number uses the semantic version format X.Y.Z (e.g., 1.0.0):
| Version Segment | Meaning | Increment Conditions | Example |
|---|---|---|---|
| X (Major Version) | Major feature changes, non-compatible API changes | Non-compatible major changes | 1.0.0 → 2.0.0 |
| Y (Minor Version) | New features with backward compatibility | Backward compatible new features | 1.0.0 → 1.1.0 |
| Z (Patch Version) | Backward compatible bug fixes | Backward compatible bug fixes | 1.0.0 → 1.0.1 |
Note
- The version number can only be incremented, not rolled back
- The version number must not contain letters or special characters, only numbers and dots
- Pre-release version identifiers can be used:
1.0.0-alpha,1.0.0-beta,1.0.0-rc, etc.