Skip to content

Commit

Permalink
2.7.0 workflow if
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Feb 5, 2025
1 parent fbda7aa commit dc59562
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 208 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filecat",
"version": "2.6.0",
"version": "2.7.0",
"description": "filecat 文件管理器",
"author": "xiaobaidadada",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/common/req/file.req.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface step_item {
use_job_children_list?:job_item[];

running_type?: running_type;
if?:string;
}

export interface job_item {
Expand All @@ -77,6 +78,7 @@ export interface job_item {
duration?:string; // 运行时长

running_type?: running_type; // 是否正在运行
if?:string;
}

// 目录下所有正在执行的任务实时输出
Expand Down
4 changes: 3 additions & 1 deletion src/main/domain/file/workflow/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ user_id: 1 # 会覆盖 username 对应的用户 id 只允许特定设置的用
# 所有的jobs下的任务都会被并行执行
jobs:
build-job1:
if: 1==1 # 判断这个job要不要执行
cwd: E:\test # 需要一个实际的执行目录 默认是当前的yml所在目录 目录内的文件清理需要自己使用命令操作 必须是绝对路径
name: 第一阶段执行
repl: false # 交互式运行 当上一个step 运行没有结束 有输出的时候 就执行下一个 step 默认是 false 必须要自己设置好流程 避免出现一直等待 那么只能手动关闭了
Expand All @@ -40,6 +41,7 @@ jobs:
cwd: E:\test2
name: 第二阶段
steps:
run: ls
- if: 1==2 # 判断这个step要不要执行
run: ls


Loading

0 comments on commit dc59562

Please sign in to comment.