c385db63be
* WIP proxy/deploy * WIP, registry proxy in express working * A couple of notes, preparing for indexing * Move the changes to prod-worker into the new file * Deploy command working with indexing and runs (docker provider only for now) * Removed ts-expect-error directive * Fixed build command
24 lines
515 B
TypeScript
24 lines
515 B
TypeScript
import { depot } from "@depot/sdk-node";
|
|
import { env } from "~/env.server";
|
|
|
|
export async function createRemoteImageBuild() {
|
|
if (!env.DEPOT_TOKEN || !env.DEPOT_PROJECT_ID) {
|
|
return;
|
|
}
|
|
|
|
const result = await depot.build.v1.BuildService.createBuild(
|
|
{ projectId: env.DEPOT_PROJECT_ID },
|
|
{
|
|
headers: {
|
|
Authorization: `Bearer ${env.DEPOT_TOKEN}`,
|
|
},
|
|
}
|
|
);
|
|
|
|
return {
|
|
projectId: env.DEPOT_PROJECT_ID,
|
|
buildToken: result.buildToken,
|
|
buildId: result.buildId,
|
|
};
|
|
}
|