@@ -18,6 +18,7 @@ weight: 4
1818---
1919
2020> An action is a process that enables a task to be carried out before, during or at the end of the execution of a workflow.
21+ > For example, an action can be used to retrieve or upload files to an SFTP server.
2122
2223## What is it for?
2324
@@ -37,8 +38,37 @@ At present, actions can only be used within a workflow. It is therefore not curr
3738workflow :
3839 jobs :
3940 - action : # ...
40- - pipeline : # ...
41- - action : # ...
41+ ` ` `
42+
43+ We've made sure that you can use your own actions.
44+
45+ You need to implement the ` Kiboko\Contract\Action\Interface` and in the `execute` method, you simply write your script.
46+
47+ ` ` ` php
48+ <?php
49+
50+ namespace App;
51+
52+ final readonly class MyCustomAction implements ActionInterface
53+ {
54+ public function execute(): void
55+ {
56+ // write your script here
57+ }
58+ }
59+ ` ` `
60+
61+ Once you've written your action, you need to use it in your Satellite using the custom action plugin like this :
62+
63+ ` ` ` yaml
64+ workflow:
65+ jobs:
66+ - action:
67+ custom:
68+ use: 'App\M yCustomAction'
69+ services:
70+ App\M yCustomAction:
71+ public: true
4272` ` `
4373
4474# # Advanced usage
@@ -47,7 +77,7 @@ workflow:
4777
4878It's possible to use expressions in your pipeline using the `expression_language` option. To use these expressions,
4979you need to use our customised Providers which provide the different expressions. For more information, please visit
50- the [detailed documentation](../../feature/expression-language) of the language expressions.
80+ the [detailed documentation](../../../ feature/expression-language) of the language expressions.
5181
5282` ` ` yaml
5383action:
@@ -59,7 +89,7 @@ action:
5989
6090It's possible to add a `logger` at each action of a workflow.
6191
62- For more details, go to the [detailed logger documentation](../../feature/logger).
92+ For more details, go to the [detailed logger documentation](../../../ feature/logger).
6393
6494` ` ` yaml
6595satellite:
@@ -81,7 +111,7 @@ satellite:
81111
82112It's possible to add a `state` at each action of a workflow.
83113
84- For more details, go to the [detailed state documentation](../../feature/state)
114+ For more details, go to the [detailed state documentation](../../../ feature/state)
85115
86116` ` ` yaml
87117satellite:
0 commit comments