olivetin/docs/modules/ROOT/pages/action_execution/create_your_first.adoc

36 lines
1.3 KiB
Plaintext

[#create-your-first-action]
= Create your first action
This is an example of your very first action. First of all, edit your config.yaml, and enter this YAML markup;
.config.yaml
[source,yaml]
----
actions:
- title: Say hello
shell: echo "Hello!"
icon: smile
----
If OliveTin is running, it should popup on your dashboard like this;
image::hello-world.png[]
Simply click on the button to execute the shell command. You can expand the executions to view the logs.
== Important considerations
* The action title must be unique. If you have multiple actions with the same title, only one will be shown.
== What's Next?
Now that you've created your first action, here are some logical next steps:
* xref:action_customization/intro.adoc[Customize your actions] - Learn how to set icons, timeouts, and other action properties
* xref:args/intro.adoc[Add arguments to actions] - Make your actions interactive with user input
* xref:action_examples/intro.adoc[Browse action examples] - See real-world examples for common use cases
* xref:action_execution/oncron.adoc[Schedule actions] - Set up actions to run automatically on a schedule
* xref:action_execution/onwebhook.adoc[Trigger actions via webhooks] - Integrate OliveTin with external systems
* xref:dashboards/intro.adoc[Organize actions with dashboards] - Create custom views to organize your actions