import { type ExpressionSource, ExpressionValue } from "./expression.js"; import type { Permissions } from "./permissions.js"; import { type ConditionLike, type ConfigValue, Step, type StepLike } from "./step.js"; interface CommonJobFields { name?: string | ExpressionValue; needs?: Job[]; if?: ConditionLike; permissions?: Permissions; concurrency?: { group: string; cancelInProgress?: boolean | string; }; continueOnError?: boolean | string; } export interface ServiceContainer { image: string; credentials?: { username: string; password: string | ExpressionValue; }; env?: Record; ports?: string[]; volumes?: string[]; options?: string; } export type RunsOn = string | ExpressionValue | readonly string[] | { group?: string; labels?: string | readonly string[]; }; export interface StepsJobConfig extends CommonJobFields { runsOn: RunsOn; strategy?: { matrix?: unknown; failFast?: boolean | ConditionLike; maxParallel?: number; }; env?: Record; timeoutMinutes?: number; defaults?: { run?: { shell?: string; workingDirectory?: string; }; }; environment?: { name: string | ExpressionValue; url?: string; } | string | ExpressionValue; services?: Record; container?: ServiceContainer | string; } export interface ReusableJobConfig extends CommonJobFields { uses: string; with?: Record; secrets?: "inherit" | Record; } export type JobConfig = StepsJobConfig | ReusableJobConfig; export interface StepsJobDef extends StepsJobConfig { id?: string; steps: StepLike | StepLike[]; outputs?: Record; } export interface ReusableJobDef extends ReusableJobConfig { id?: string; } export type JobDef = StepsJobDef | ReusableJobDef; export declare class Job implements ExpressionSource { #private; readonly outputs: Readonly>; constructor(id: string, config: JobConfig, init?: { steps?: StepLike[]; outputs?: Record; }); get id(): string; resolveSteps(): Step[]; inferNeeds(stepOwners?: Map, Job[]>): Job[]; toYaml(stepOwners?: Map, Job[]>): Record; } export declare function toKebabCase(input: string): string; export declare function resolveJobId(def: JobDef): string; export declare function job(id: string, config: JobDef): Job; export {}; //# sourceMappingURL=job.d.ts.map