Skip to main content

script

The script step type runs inline code with an explicit interpreter. Use it for a small, portable script body instead of encoding a heredoc in a shell command.

steps:
- name: check generated files
type: script
interpreter: python3
working_directory: .
script: |
from pathlib import Path
if not Path("generated/config.yaml").exists():
raise SystemExit("missing generated config")

Fields

FieldDescription
interpreterRequired executable that evaluates script. Supports templates.
scriptRequired inline program text. Supports templates.
working_directoryOptional process directory.
envOptional environment map.

Do not set command on a script step. Use type: shell for a real shell command and type: script when the interpreter and body are the intentional interface.