Skip to main content Skip to docs navigation
Check
View on GitHub

Instructions

Define actions and action-sets for a menu command.

The instructions.yaml file

This file purpose is declaring which actions or workflows are avaiable for a specific menu command and how one should interact with it.

  • It is being scanned by anchor at runtime upon menu command execution
  • The name of the folder containing the instructions.yaml file will be the name that is used as its identifier

The basic structure of an instruction file is as follows:

instructions:

  actions:
    ...

  workflows:
    ...

Contextual instructions

Every instructions.yaml file has an option to define a unified global context for all of its comprising actions and workflows, these affects the pre-execution flow with custom prompt messages.

globals:
  context: <context-in-here>
  
instructions:

  actions:
    ...

  workflows:
    ...

Available contexts

  • application: prints basic prompt message before action is executed
  • kubernetes: prints Kubernetes current context information before action is executed
When an action or workspace overrides the context attribute and it differs from the global one then the overridden context will be the one in use.