-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
Objective
Create tooling to automatically generate action.yml metadata files for each JavaScript module in pkg/workflow/js/.
Context
Each custom action needs an action.yml file defining its inputs, outputs, and runtime. We have 200+ JavaScript files that need to be converted.
Approach
- Create a script to analyze JavaScript files and extract:
- Required inputs (from
core.getInput()calls) - Outputs (from
core.setOutput()calls) - Dependencies
- Required inputs (from
- Generate
action.ymlwith structure:name: 'Action Name' description: 'Description from JSDoc or filename' inputs: input-name: description: 'Input description' required: true outputs: output-name: description: 'Output description' runs: using: 'node20' main: 'index.js'
- Generate README.md for each action
- Create script to bundle JavaScript for each action
- Run for a subset of actions first (5-10) as proof of concept
Files to Create
- Create:
scripts/generate-action-metadata.js - Create:
actions/{action-name}/action.yml(for each action) - Create:
actions/{action-name}/README.md(for each action) - Create:
actions/{action-name}/index.js(bundled JavaScript)
Acceptance Criteria
- Script can parse JavaScript and extract inputs/outputs
- Generated action.yml files are valid
- At least 5-10 actions are converted as proof of concept
- Generated actions work when referenced in test workflows
- READMEs include usage examples
Related to [plan] Refactor compiler to use custom actions for JavaScript code #5947
AI generated by Plan Command for #5946
Copilot