@cdwr/core
Version:
A set of core utilities for the Codeware ecosystem.
20 lines (19 loc) • 635 B
TypeScript
import { Context } from '@actions/github/lib/context';
import { z } from 'zod';
export declare const EnvironmentSchema: z.ZodEnum<["preview", "production"]>;
export type Environment = z.infer<typeof EnvironmentSchema>;
/**
* Get the environment to use for deployment.
*
* When the environment is null, a reason is also provided.
*
* @param context GitHub context
* @param mainBranch Main branch
* @returns Environment to use for deployment or null if unsupported
*/
export declare const getDeployEnv: (context: Context, mainBranch: string) => {
environment: Environment;
} | {
environment: null;
reason: string;
};