Update and add new action settings in workflows

- Added new action setting 'finish_task' in auto_command workflow.
- Updated the description in 'new_file' action setting in auto_command workflow.
- Modified 'run_shell_file' action setting in auto_command workflow to clarify it runs a shell script file.
- Added new action settings 'get_project_tree' and 'load_file' in extension_demo workflow.
This commit is contained in:
bobo.yang 2023-07-24 00:11:56 +08:00
parent 31fea27cf6
commit 598f91f5ea
5 changed files with 42 additions and 4 deletions

View File

@ -0,0 +1,14 @@
{
"name": "finish_task",
"description": "Flag task as finished",
"type": [
"task"
],
"args": [
],
"action": "finish_task",
"handler": [
"echo",
"Task finished"
]
}

View File

@ -1,6 +1,6 @@
{ {
"name": "new_file", "name": "new_file",
"description": "create new file or replace file with specified content", "description": "create new file or replace file with new content",
"type": [ "type": [
"*" "*"
], ],

View File

@ -1,12 +1,12 @@
{ {
"name": "run_shell_file", "name": "run_shell_file",
"description": "run shell script", "description": "run shell script file",
"type": [ "type": [
"shell" "shell"
], ],
"args": [ "args": [
{ {
"name": "script", "name": "script_file",
"description": "shell script file to run", "description": "shell script file to run",
"type": "string", "type": "string",
"as": "file", "as": "file",
@ -16,6 +16,6 @@
"action": "run_shell", "action": "run_shell",
"handler": [ "handler": [
"bash", "bash",
"${script}" "${script_file}"
] ]
} }

View File

@ -0,0 +1,9 @@
{
"name": "get_project_tree",
"description": "Get project file list",
"type": ["project"],
"action": "get_project_tree",
"args": [
],
"handler": ["git", "ls-files"]
}

View File

@ -0,0 +1,15 @@
{
"name": "load_file",
"description": "Load file content",
"type": ["file"],
"action": "load_file",
"args": [
{
"name": "fileName",
"description": "Specify the file, which content will be loaded",
"type": "string",
"from": "content.content.fileName"
}
],
"handler": ["cat", "${fileName}"]
}