Skip to content

Commit

Permalink
Merge pull request #59 from fluentci-io/feat/run-wasm-from-container-…
Browse files Browse the repository at this point in the history
…registry

feat: add support for executing wasm plugin from a container registry (ghcr.io, gcr.io, azurecr.io)
  • Loading branch information
tsirysndr authored Jul 26, 2024
2 parents 553431e + f36f397 commit 42615af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cmd/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 42615af

Please sign in to comment.