docs: complete workflow.yaml quick reference
This commit is contained in:
@@ -15,25 +15,45 @@
|
|||||||
|
|
||||||
## Workflow.yaml 核心规则
|
## Workflow.yaml 核心规则
|
||||||
|
|
||||||
### 步骤定义
|
### 完整结构
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
name: 套件名称
|
||||||
- id: my-step
|
description: 功能描述
|
||||||
name: 我的步骤
|
version: 1.0.0
|
||||||
script_id: run # ✅ script_id 优先
|
author: 作者
|
||||||
|
tags: [标签1]
|
||||||
|
category: 业务分类
|
||||||
|
|
||||||
params:
|
params:
|
||||||
input: $params.input_path # ✅ 使用 $params.xxx
|
input_path:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
desc: 输入文件路径
|
||||||
|
|
||||||
|
base_image: gis-base:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: step1
|
||||||
|
name: 步骤1
|
||||||
|
script_id: run
|
||||||
|
params:
|
||||||
|
input: $params.input_path
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 引用语法
|
||||||
|
|
||||||
|
| 语法 | 说明 | 示例 |
|
||||||
|
|------|------|------|
|
||||||
|
| `$params.xxx` | 引用套件输入参数 | `$params.input_path` |
|
||||||
|
| `$steps.step_id.output_name` | 引用前一步骤输出 | `$steps.step1.result_path` |
|
||||||
|
|
||||||
### 常见错误
|
### 常见错误
|
||||||
|
|
||||||
| ❌ 错误 | ✅ 正确 |
|
| ❌ 错误 | ✅ 正确 |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `script: run.py` | `script_id: run` |
|
| `script: run.py` | `script_id: run` |
|
||||||
| `script: run` | `script_id: run` |
|
|
||||||
| `params_mapping: {...}` | `params: {...}` |
|
| `params_mapping: {...}` | `params: {...}` |
|
||||||
| `$params.xxx` | `$params.xxx` |
|
|
||||||
| `$inputs.xxx` | `$params.xxx` |
|
| `$inputs.xxx` | `$params.xxx` |
|
||||||
|
|
||||||
### 跨步骤文件共享
|
### 跨步骤文件共享
|
||||||
|
|||||||
Reference in New Issue
Block a user