import { ScalarToken, TemplateToken } from "../templates/tokens/index.js"; import { TemplateContext } from "../templates/template-context.js"; import { ErrorPolicy } from "../model/convert.js"; import { Step } from "../model/workflow-template.js"; /** * Represents a parsed and converted action.yml file */ export type ActionTemplate = { name: string; description: string; author?: string; inputs?: ActionInputDefinition[]; outputs?: ActionOutputDefinition[]; runs: ActionRuns; branding?: ActionBranding; }; /** * Represents an input definition from the action.yml inputs section. */ export type ActionInputDefinition = { id: string; description?: string; required?: boolean; default?: ScalarToken; deprecationMessage?: string; }; /** * Represents an output definition from the action.yml outputs section. */ export type ActionOutputDefinition = { id: string; description?: string; value?: ScalarToken; }; /** * Union type representing the different ways an action can be executed. */ export type ActionRuns = ActionRunsComposite | ActionRunsNode | ActionRunsDocker; /** * Configuration for composite actions that execute a sequence of steps. */ export type ActionRunsComposite = { using: "composite"; steps: Step[]; }; /** * Configuration for JavaScript actions that run in Node.js. */ export type ActionRunsNode = { using: "node12" | "node16" | "node20" | "node24"; main: string; pre?: string; preIf?: string; post?: string; postIf?: string; }; /** * Configuration for Docker container actions. */ export type ActionRunsDocker = { using: "docker"; image: string; preEntrypoint?: string; preIf?: string; entrypoint?: string; postEntrypoint?: string; postIf?: string; args?: string[]; env?: Record; }; /** * Branding configuration for displaying the action in the GitHub Marketplace. */ export type ActionBranding = { icon?: string; color?: string; }; export type ActionTemplateConverterOptions = { /** * The error policy to use when converting the action. * By default, conversion will be skipped if there are errors in the {@link TemplateContext}. */ errorPolicy?: ErrorPolicy; }; /** * Converts a parsed action template token into a typed ActionTemplate */ export declare function convertActionTemplate(context: TemplateContext, root: TemplateToken, options?: ActionTemplateConverterOptions): ActionTemplate; //# sourceMappingURL=action-template.d.ts.map