Add group functions to core

This commit is contained in:
Jonathan Clem committed 2019-08-28 22:35:27 -04:00
1 parent db42e6152b
commit aba89f20d2
4 files changed
+72 -1

No files matched your search

+17
View File
@@ -78,3 +78,20 @@ catch (err) {
core.error(`Error ${err}, action may still succeed though`);
}
```
This library can also wrap chunks of output in foldable groups.
```js
const core = require('@actions/core')
// Manually wrap output
core.groupStart('Do some function')
doSomeFunction()
core.groupEnd()
// Wrap an asynchronous function call
const result = await core.group('Do something async', async () => {
const response = await doSomeHTTPRequest()
return response
})
```