Skip to content

Commit

Permalink
use defaults for github env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskalmar committed Nov 18, 2023
1 parent f4e162c commit 62137ad
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,27 +374,32 @@ export const PlatformModeConfigSchema = BaseConfigSchema.extend({
/**
* CI build ID
*/
ciBuildId: z.string(),
// @ts-expect-error If not set, it will be caught during config validation
ciBuildId: z.string().default(process.env.CI_BUILD_ID),

/**
* CI build number
*/
ciBuildNumber: z.string(),
// @ts-expect-error If not set, it will be caught during config validation
ciBuildNumber: z.string().default(process.env.CI_BUILD_NUMBER),

/**
* Git repository name (e.g. 'lost-pixel/lost-pixel-storybook')
*/
repository: z.string(),
// @ts-expect-error If not set, it will be caught during config validation
repository: z.string().default(process.env.REPOSITORY),

/**
* Git branch name (e.g. 'main')
*/
commitRefName: z.string(),
// @ts-expect-error If not set, it will be caught during config validation
commitRefName: z.string().default(process.env.COMMIT_REF_NAME),

/**
* Git commit SHA (e.g. 'b9b8b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9')
*/
commitHash: z.string(),
// @ts-expect-error If not set, it will be caught during config validation
commitHash: z.string().default(process.env.COMMIT_HASH),

/**
* File path to event.json file
Expand Down

0 comments on commit 62137ad

Please sign in to comment.