mirror of
https://github.com/go-task/task.git
synced 2026-06-15 11:51:41 +00:00
Merge branch 'group-begin-message' of https://github.com/janslow/task into janslow-group-begin-message
This commit is contained in:
@@ -973,6 +973,33 @@ tasks:
|
||||
finishes, so you won't have live feedback for commands that take a long time
|
||||
to run.
|
||||
|
||||
When using the `group` output, you can optionally provide a templated message
|
||||
to print at the start of the group. This can be useful for instructing CI
|
||||
systems to group all of the output for a given task, such as with [GitHub
|
||||
Actions' `::group::` command](https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#grouping-log-lines).
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
output:
|
||||
group:
|
||||
begin: '::begin::{{.TASK}}'
|
||||
end: '::endgroup::'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- echo 'Hello, World!'
|
||||
silent: true
|
||||
```
|
||||
|
||||
```bash
|
||||
$ task default
|
||||
::begin::default
|
||||
Hello, World!
|
||||
::endgroup::
|
||||
```
|
||||
|
||||
The `prefix` output will prefix every line printed by a command with
|
||||
`[task-name] ` as the prefix, but you can customize the prefix for a command
|
||||
with the `prefix:` attribute:
|
||||
|
||||
Reference in New Issue
Block a user