Files
triggerdotdev--trigger.dev/apps/webapp/app/v3/remoteImageBuilder.server.ts
Eric Allam c385db63be v3: cli deploy command (#931)
* 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
2024-03-08 10:49:42 +00:00

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,
};
}