From f36f3976da7884f92597e6b26359bbd7adbd6182 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 26 Jul 2024 19:39:33 +0000 Subject: [PATCH] feat: add support for executing wasm plugin from a container registry (ghcr.io, gcr.io, azurecr.io) --- src/cmd/run.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cmd/run.ts b/src/cmd/run.ts index d259f37..44f98c8 100644 --- a/src/cmd/run.ts +++ b/src/cmd/run.ts @@ -531,7 +531,13 @@ const saveRepositoryMetadata = async (id: string) => { }; const runWasmPlugin = async (pipeline: string, job: string[], cwd = ".") => { - if (pipeline.endsWith(".wasm") || pipeline.endsWith("?wasm=1")) { + if ( + pipeline.endsWith(".wasm") || + pipeline.endsWith("?wasm=1") || + pipeline.startsWith("azurecr.io/") || + pipeline.startsWith("ghcr.io/") || + pipeline.startsWith("gcr.io/") + ) { const command = new Deno.Command("bash", { args: ["-c", `fluentci-engine call -m ${pipeline} -- ` + job.join(" ")], stdout: "inherit",