feat(core): add insights output (#575)
This commit is contained in:
@@ -272,6 +272,21 @@ It is possible to convert output to PDF when using a markdown template by settin
|
||||
config_output: markdown-pdf
|
||||
```
|
||||
|
||||
### ✨ Render `Metrics insights` statically
|
||||
|
||||
It is possible to generate an HTML file containing `✨ Metrics insights` output by setting `config_output` to `insights`. Resulting output will already be pre-rendered and not contain any external sources (i.e. no JavaScript and style sheets).
|
||||
|
||||
> Note that like `✨ Metrics insights` content is not configurable.
|
||||
|
||||
#### ℹ️ Examples workflows
|
||||
|
||||
```yaml
|
||||
- uses: lowlighter/metrics@latest
|
||||
with:
|
||||
# ... other options
|
||||
config_output: insights
|
||||
```
|
||||
|
||||
### 🐳 Faster execution with prebuilt docker images
|
||||
|
||||
If you're using the official release `lowlighter/metrics` as a GitHub Action (either a specific version, `@latest` or `@master`), it'll pull a prebuilt docker container image from [GitHub Container Registry](https://github.com/users/lowlighter/packages/container/package/metrics) which contains already installed dependencies which will cut execution time from ~5 minutes to ~1 minute.
|
||||
|
||||
@@ -47,7 +47,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q
|
||||
pending.push((async () => {
|
||||
try {
|
||||
console.debug(`metrics/compute/${login}/plugins > ${name} > started`)
|
||||
data.plugins[name] = await imports.plugins[name]({login, q, imports, data, computed, rest, graphql, queries, account}, {...plugins[name], extras:conf.settings?.extras?.features ?? conf.settings?.extras?.default ?? false})
|
||||
data.plugins[name] = await imports.plugins[name]({login, q, imports, data, computed, rest, graphql, queries, account}, {extras:conf.settings?.extras?.features ?? conf.settings?.extras?.default ?? false, ...plugins[name]})
|
||||
console.debug(`metrics/compute/${login}/plugins > ${name} > completed`)
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
@@ -197,13 +197,14 @@ inputs:
|
||||
type: string
|
||||
default: auto
|
||||
values:
|
||||
- auto # Defaults to template default
|
||||
- auto # Defaults to template default
|
||||
- svg
|
||||
- png # Does not support animations
|
||||
- jpeg # Does not support animations and transparency
|
||||
- json # Outputs a JSON file instead of an image
|
||||
- markdown # Outputs a Markdown file instead of an image
|
||||
- markdown-pdf # Outputs a Markdown file as PDF instead of an image
|
||||
- png # Does not support animations
|
||||
- jpeg # Does not support animations and transparency
|
||||
- json # Outputs a JSON file instead of an image
|
||||
- markdown # Outputs a Markdown file instead of an image
|
||||
- markdown-pdf # Outputs a Markdown file as PDF instead of an image
|
||||
- insights # Outputs a rendered HTML file of Metrics Insights
|
||||
|
||||
# Number of retries in case rendering fail
|
||||
retries:
|
||||
|
||||
Reference in New Issue
Block a user