跳到主要内容

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

RuleDescription
FormatMandatory YAML format
File NameMandatory 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 SegmentMeaningIncrement ConditionsExample
X (Major Version)Major feature changes, non-compatible API changesNon-compatible major changes1.0.02.0.0
Y (Minor Version)New features with backward compatibilityBackward compatible new features1.0.01.1.0
Z (Patch Version)Backward compatible bug fixesBackward compatible bug fixes1.0.01.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.