Skip to main content

action.yaml

Example of an action.yaml

Shell Action example at the v3 version.
schema-version: v3 #required
kind: action #required
metadata: #required
name: action-basic-structure #required
display-name: action-basic-structure #required
description: Action example #required
version: 1.0.0 #required
spec:
type: shell #required #accepted values: python or shell
docs: #optional
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md
inputs: #optional
- label: Select the connection for your aws-dynamo-alias-action
name: aws-dynamo-alias-action
type: required-connection
connection-interface-type: aws-dynamo-conn
- label: Who are you?
name: user_name
type: text
required: false
pattern: '([A-Z][a-z]+)+'
help: Inform your name
shell: #required
workdir: .
requirements-check:
- check-command:
linux: |
git --version
mac: |
git --version
windows: |
git --version
info: Git is not installed!
script:
linux: |
echo "Hello {{inputs.user_name}}!"
mac: |
echo "Hello {{inputs.user_name}}!"
windows: |
echo "Hello {{inputs.user_name}}!"

Action Attributes

schema-version

Manifest schema version.

schema-version: v3

kind

Manifest type.

kind: action

metadata

The metadata fields identify the Action. All of them are string values.

name

Internal name of the Action, used as a unique identifier. If you do not rename it, the previously entered name is used. Use kebab-case.

name: action-basic-structure

display-name

Name of the Action that will be displayed in the Portal. If you do not rename it, the previously entered name is used.

display-name: action-basic-structure

description

Action description. It must have at least three characters and at most 500 characters.

description: Action example

version

Action version. It follows Semantic Versioning (SemVer).

version: 1.0.0

spec

This section defines the Action specification. Fields are string values, unless otherwise noted.

type

Action type. It can be python or shell.

type: python

docs

Markdown files with the Action documentation.

docs:
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md

inputs

Collect information relevant to the Action scope. The STK CLI interprets the inputs when executing commands to request this information from users.

For more information, see the Inputs section.

python

Field that defines the path to the Python scripts that the Action should use.

  • workdir: path relative to the Action folder where the Python scripts are located;
  • script: full name of the script file that you want the Action to execute.

Example:

spec:
# ...
python:
workdir: .
script: script.py