diff --git a/src/index.ts b/src/index.ts index aa91230..0b07468 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import * as github from "@actions/github"; import * as core from "@actions/core"; import { Value } from "@sinclair/typebox/value"; -import { envSchema } from "./types/env"; +import { Env, envSchema } from "./types/env"; import { assistivePricingSettingsSchema, PluginInputs } from "./types/plugin-input"; import { run } from "./run"; @@ -9,7 +9,13 @@ import { run } from "./run"; * Run the plugin as a GitHub Action instance. */ async function actionRun() { - const env = Value.Decode(envSchema, process.env); + const payloadEnv = { + SUPABASE_KEY: process.env.SUPABASE_KEY, + SUPABASE_URL: process.env.SUPABASE_URL, + UBIQUIBOT_PUBLIC_KEY: process.env.UBIQUIBOT_PUBLIC_KEY, + }; + + const env = Value.Decode(envSchema, payloadEnv); const webhookPayload = github.context.payload.inputs; const settings = Value.Decode(assistivePricingSettingsSchema, Value.Default(assistivePricingSettingsSchema, JSON.parse(webhookPayload.settings)));