Steps are blocks that group one or more actions. That way, a set of actions could be executed several times or make their execution conditional on a boolean expression. By composing a step of multiples actions, it's possible to build more complex process.
How are steps executed?
Steps are executed sequentially one at a time. When they have a condition
where, steps are only executed if the condition expression is evaluated to
When a step has a
loop sentence (see loops), the loop expression is resolved
and the step is evaluated as much times as elements has the loop. If the
loop is combined
where expression, then the conditional expression is processed separately for each
loops, be aware that the
whenstatement is processed separately for each item.
The following recipe has one step called "Say ahoy" with just one action that runs the command
That step is executed only if the recipe is being running on Linux:
extra: rr: packages: "recipe-runner/system-module": "1.0.x-dev" steps: - name: "Say ahoy" actions: - run: echo ahoy there when: os_family == "Linux"
Every step should have a name, which is included in the output from running the recipe.
This is human readable output, so it is useful to provide good descriptions of each step.
If the name is not provided though, a name will be generated automatically following