file-actions-demo.yaml
1 # Example: File-Based Actions (Option A) 2 # 3 # Actions loaded from .py files in the actions/ directory next to this workflow. 4 # Each action file exports: run(step, flags, cwd) → dict 5 # 6 # Directory structure: 7 # examples/workflows/ 8 # ├── file-actions-demo.yaml ← this file 9 # └── actions/ 10 # ├── system_info.py ← action: system-info 11 # └── line_count.py ← action: line-count 12 # 13 # Usage: 14 # praisonai workflow run file-actions-demo.yaml 15 # praisonai workflow run file-actions-demo.yaml --dry-run 16 17 type: job 18 name: file-actions-demo 19 description: Demonstrates file-based custom actions from actions/ directory 20 21 steps: 22 - name: System info 23 action: system-info 24 25 - name: Count Python files 26 action: line-count 27 pattern: "*.py" 28 directory: "." 29 30 - name: Count YAML files 31 action: line-count 32 pattern: "*.yaml" 33 directory: "."