Skip to content

Commit 42615af

Browse files
authored
Merge pull request #59 from fluentci-io/feat/run-wasm-from-container-registry
feat: add support for executing wasm plugin from a container registry (ghcr.io, gcr.io, azurecr.io)
2 parents 553431e + f36f397 commit 42615af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cmd/run.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,13 @@ const saveRepositoryMetadata = async (id: string) => {
531531
};
532532

533533
const runWasmPlugin = async (pipeline: string, job: string[], cwd = ".") => {
534-
if (pipeline.endsWith(".wasm") || pipeline.endsWith("?wasm=1")) {
534+
if (
535+
pipeline.endsWith(".wasm") ||
536+
pipeline.endsWith("?wasm=1") ||
537+
pipeline.startsWith("azurecr.io/") ||
538+
pipeline.startsWith("ghcr.io/") ||
539+
pipeline.startsWith("gcr.io/")
540+
) {
535541
const command = new Deno.Command("bash", {
536542
args: ["-c", `fluentci-engine call -m ${pipeline} -- ` + job.join(" ")],
537543
stdout: "inherit",

0 commit comments

Comments
 (0)