From 534d69af28d0533e21c16f7945d1a8b9760f5bc7 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Sun, 29 Sep 2024 01:28:59 +0100 Subject: [PATCH] chore: T.Optional public key as its disabled --- src/index.ts | 3 ++- src/types/env.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 0b07468..ff54a01 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,10 +9,11 @@ import { run } from "./run"; * Run the plugin as a GitHub Action instance. */ async function actionRun() { + const payloadEnv = { SUPABASE_KEY: process.env.SUPABASE_KEY, SUPABASE_URL: process.env.SUPABASE_URL, - UBIQUIBOT_PUBLIC_KEY: process.env.UBIQUIBOT_PUBLIC_KEY, + UBIQUIBOT_PUBLIC_KEY: process.env.UBIQUIBOT_PUBLIC_KEY || "temporarily-disabled", }; const env = Value.Decode(envSchema, payloadEnv); diff --git a/src/types/env.ts b/src/types/env.ts index 6b826ef..546f266 100644 --- a/src/types/env.ts +++ b/src/types/env.ts @@ -5,7 +5,7 @@ import { StandardValidator } from "typebox-validators"; export const envSchema = T.Object({ SUPABASE_URL: T.String(), SUPABASE_KEY: T.String(), - UBIQUIBOT_PUBLIC_KEY: T.String(), + UBIQUIBOT_PUBLIC_KEY: T.Optional(T.String()), // optional because it's currently disabled }); export const envConfigValidator = new StandardValidator(envSchema);