[Feature] Allow parameters in actions / procedures #1265

Open
opened 2026-03-22 17:16:53 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @falnos24865 on GitHub (Jul 5, 2025).

The primary issue I have using actions is that you cannot pass in different values at run time. This limits the scope of what they can do. For example I would like to have an action that allows a user to deploy a chosen branch to a test site. Right now this cannot be done (without version clunky workarounds using variables, and that does not scale well).

Originally created by @falnos24865 on GitHub (Jul 5, 2025). The primary issue I have using actions is that you cannot pass in different values at run time. This limits the scope of what they can do. For example I would like to have an action that allows a user to deploy a chosen branch to a test site. Right now this cannot be done (without version clunky workarounds using variables, and that does not scale well).
GiteaMirror added the enhancement label 2026-03-22 17:16:53 -05:00
Author
Owner

@mbecker20 commented on GitHub (Aug 30, 2025):

Since 1.19.0, Actions can take args, available to use in the script as ARGS. I still need to document this, so here is an example:

const { REPO } = ARGS as { REPO: string };

if (!REPO) {
  throw "Must pass REPO arg with repo name";
}

const repo = await komodo.read("GetRepo", { repo: REPO});
console.log(repo);

Then in Procedures, you are able to configure the args to pass.
You can also pass them when calling the Action with km CLI:
km run action <name> "REPO=<repo-name>"

Let me know if you have any thoughts

@mbecker20 commented on GitHub (Aug 30, 2025): Since 1.19.0, Actions can take args, available to use in the script as `ARGS`. I still need to document this, so here is an example: ```ts const { REPO } = ARGS as { REPO: string }; if (!REPO) { throw "Must pass REPO arg with repo name"; } const repo = await komodo.read("GetRepo", { repo: REPO}); console.log(repo); ``` Then in Procedures, you are able to configure the args to pass. You can also pass them when calling the Action with `km` CLI: `km run action <name> "REPO=<repo-name>"` Let me know if you have any thoughts
Author
Owner

@Manuki-San commented on GitHub (Feb 13, 2026):

I have a similar request: the ability to pass a parameter in the body of a procedure webhook (e.g., via the GitLab Listener) and have that value injected into the args or body object of the script actions. Currently, using global variables as a workaround creates significant race conditions in a monorepo setup where multiple stacks are triggered simultaneously.

Example

curl -f -k -v -X POST "https://komodo.home.lan/listener/gitlab/procedure/698ec60b37f550a49e54d783/master" \
           -H "X-Gitlab-Token: $KOMODO_GLOBAL_SECRET" \
           -H "X-Gitlab-Event: Push Hook" \
           -H "Content-Type: application/json" \
           -d '{
             "ref": "refs/heads/master",
             "stack_name": "nodered",
             "repository": { "name": "homelab-docker" }
           }
const stack = args.stack_name;
await komodo.stacks.deploy(stack);
@Manuki-San commented on GitHub (Feb 13, 2026): I have a similar request: the ability to pass a parameter in the body of a procedure webhook (e.g., via the GitLab Listener) and have that value injected into the args or body object of the script actions. Currently, using global variables as a workaround creates significant race conditions in a monorepo setup where multiple stacks are triggered simultaneously. Example ```bash curl -f -k -v -X POST "https://komodo.home.lan/listener/gitlab/procedure/698ec60b37f550a49e54d783/master" \ -H "X-Gitlab-Token: $KOMODO_GLOBAL_SECRET" \ -H "X-Gitlab-Event: Push Hook" \ -H "Content-Type: application/json" \ -d '{ "ref": "refs/heads/master", "stack_name": "nodered", "repository": { "name": "homelab-docker" } } ``` ```typescript const stack = args.stack_name; await komodo.stacks.deploy(stack); ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#1265