added envs to sql generation workflow

This commit is contained in:
mertalev 2023-12-05 19:30:36 -05:00
parent 4253f66ca1
commit 24c33295fb
No known key found for this signature in database
GPG key ID: 9181CD92C0A1C5E3
2 changed files with 4 additions and 1 deletions

View file

@ -261,6 +261,8 @@ jobs:
- name: Run SQL generation
run: npm run sql:generate
env:
DB_URL: postgres://postgres:postgres@localhost:5432/immich
- name: Find file changes
uses: tj-actions/verify-changed-files@v13.1

View file

@ -10,10 +10,11 @@ const WHEN_DB_URL_SET = Joi.when('DB_URL', {
});
export const immichAppConfig: ConfigModuleOptions = {
ignoreEnvFile: process.env.USE_ENV_FILE === 'false',
envFilePath: '.env',
isGlobal: true,
validationSchema: Joi.object({
NODE_ENV: Joi.string().required().valid('development', 'production', 'staging').default('development'),
NODE_ENV: Joi.string().optional().valid('development', 'production', 'staging').default('development'),
DB_USERNAME: WHEN_DB_URL_SET,
DB_PASSWORD: WHEN_DB_URL_SET,
DB_DATABASE_NAME: WHEN_DB_URL_SET,