forked from lowlighter/metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadata.yml
476 lines (391 loc) · 12.3 KB
/
metadata.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
name: "🧱 Core"
category: core
description: Global configuration and options
supports:
- user
- organization
- repository
scopes: []
inputs:
token:
description: |
GitHub Personal Access Token
No scopes are required by default, though some plugins and features may require additional scopes
When using a configuration which does not requires a GitHub PAT, you may pass `NOT_NEEDED` instead.
Note that when doing so, all defaults values using `.user.*` will not be applicable meaning that they need to be filled manually.
Most of the time `user` option must also be set.
type: token
required: true
user:
description: |
GitHub username
Defaults to `token` owner username.
type: string
default: ""
preset: no
repo:
description: |
GitHub repository
This option is revevalant only for repositories templates
type: string
default: ""
preset: no
committer_token:
description: |
GitHub Token used to commit metrics
Leave this to `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}`, which is a special auto-generated token restricted to current repository scope.
> 💡 When using `output_action: gist`, it will use `token` instead, since gists are outside of scope
type: token
default: ${{ github.token }}
committer_branch:
description: |
Target branch
Default value is set to your repository default branch
type: string
default: ""
committer_message:
description: |
Commit message
Use `${filename}` to display filename
type: string
default: Update ${filename} - [Skip GitHub Action]
committer_gist:
description: |
Gist id
Specify an existing gist id (can be retrieved from its URL) when using `output_action: gist`.
type: string
default: ""
preset: no
filename:
description: |
Output path
When using an asterisk (`*`), correct extension will automatically be applied according to `config_output` value
type: string
default: github-metrics.*
markdown:
description: |
Markdown template path
It can be either a local path or a full link (e.g. https://raw.githubusercontent.com)
type: string
default: TEMPLATE.md
markdown_cache:
description: Markdown file cache
type: string
default: .cache
output_action:
description: |
Output action
- `none`: just create file in `/metrics_renders` directory of action runner
- `commit`: push output to `committer_branch`
- `pull-request`: push output to a new branch and open a pull request to `committer_branch`
- `pull-request-merge`: same as `pull-request` and additionaly merge pull request
- `pull-request-squash`: same as `pull-request` and additionaly squash and merge pull request
- `pull-request-rebase`: same as `pull-request` and additionaly rebase and merge pull request
- `gist`: push output to `committer_gist`
> 💡 When using `pull-request`, you will need to set the last job with a `pull-request-*` action instead, else it won't be merged
type: string
default: commit
values:
- none
- commit
- pull-request
- pull-request-merge
- pull-request-squash
- pull-request-rebase
- gist
output_condition:
description: |
Output condition
- `always`: always try to push changes
- `data-changed`: skip changes if no data changed (e.g. like when only metadata changed)
type: string
default: always
values:
- always
- data-changed
optimize:
description: |
Optimization features
- `css`: purge and minify CSS styles
- `xml`: pretty-print XML (useful to reduce diff)
- `svg`: optimization with SVGO (experimental, require `--optimize-svg` experimental flag)
Some templates may not support all options
type: array
default: css, xml
format:
- comma-separated
values:
- css
- xml
- svg
setup_community_templates:
description: |
Community templates to setup
See [community templates guide](https://github.com/lowlighter/metrics/blob/master/source/templates/community/README.md) for more informations
type: array
format: comma-separated
default: ""
extras: yes
template:
description: |
Template
Community templates must be prefixed by at sign (`@`)
See [list of supported templates](https://github.com/lowlighter/metrics/blob/master/README.md#%EF%B8%8F-templates)
type: string
default: classic
query:
description: |
Query parameters
Pass additional parameters to templates.
This is mostly useful for custom templates.
> ⚠️ **Do not** use this option to pass other existing parameters, they will be overwritten
type: json
default: "{}"
extras_css:
extras: yes
description: |
Extra CSS
Custom CSS that will be injected in used template.
Useful to avoid creating a new template just to tweak some styling
type: string
default: ""
extras_js:
extras: yes
description: |
Extra JavaScript
Custom JavaScript that will be executed during puppeteer rendering.
Useful to avoid creating a new template just to tweak some content.
Note that is it executed within puppeteer context and **not** *metrics* context.
It is run after transformations and optimizations, but just before resizing.
type: string
default: ""
config_timezone:
description: |
Timezone for dates
See [list of supported timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
type: string
default: ""
global: yes
config_order:
description: |
Plugin order
By default, templates use `partials/_.json` ordering.
You can override the content order by using this setting.
If some partials are omitted, they will be appended at the end with default ordering
type: array
format: comma-separated
default: ""
example: base.header, base.repositories
global: yes
config_twemoji:
description: |
Use twemojis
Replace emojis by [twemojis]([twemojis](https://github.com/twitter/twemoji)) to have a consistent render across all platforms
May increase filesize.
type: boolean
default: no
global: yes
config_gemoji:
description: |
Use GitHub custom emojis
GitHub supports additional emojis which are not registered in Unicode standard (:octocat:, :shipit:, :trollface:, ...)
See full list at https://api.github.com/emojis.
May increase filesize
type: boolean
default: yes
global: yes
config_octicon:
description: |
Use GitHub octicons
Octicons are open-sourced icons provided by GitHub.
See full list at https://primer.style/octicons.
To include an octicon, use the following syntax: `:octicon-{name}-{size}:`.
Size must be a supported icon size (12, 16 or 24).
16px octicons can omit size and directly use `:octicon-{name}:` syntax.
May increase filesize
type: boolean
default: no
global: yes
config_display:
description: |
Display width (for image output formats)
- `regular`: 480px width
- `large`: 960px width (may not be supported by all templates)
- `columns`: Full width with auto-sizing (two columns for desktops, and one column for mobile)
- known issue: https://github.com/lowlighter/metrics/issues/374
type: string
default: regular
values:
- regular
- large
- columns
global: yes
config_animations:
description: Use CSS animations
type: boolean
default: yes
global: yes
config_base64:
description: |
Base64-encoded images
Enable this option to make self-contained ouput (i.e. with no external links)
type: boolean
default: yes
global: yes
config_padding:
description: |
Output padding
Although *metrics* try to auto-guess resulting height, rendering is still dependent on OS and browser settings.
It can result in cropped or oversized outputs.
This settings let you manually adjust padding with the following format:
- 1 value for both width and height
- 2 values for width fist and height second, separated by a comma (`,`)
Each value need to respect the following format:
- {number}
- {number} + {number}%
- {number}%
Percentage are relative to computed dimensions
type: string
default: 0, 8 + 11%
config_output:
description: |
Output format
- `auto`: Template default (usually `svg` or `markdown`)
- `svg`: SVG image
- `png`: PNG image (animations not supported)
- `jpeg`: JPEG image (animations and transparency not supported)
- `json`: JSON data dump
- `markdown`: Markdown rendered file
- `markdown-pdf`: PDF from markdown rendered file
- `insights`: Metrics Insights self-contained HTML file (not configurable)
type: string
default: auto
values:
- auto
- svg
- png
- jpeg
- json
- markdown
- markdown-pdf
- insights
config_presets:
description: Configuration presets
type: array
format: comma-separated
default: ""
preset: no
example: "@lunar-red"
retries:
description: Retries in case of failures (for rendering)
type: number
default: 3
min: 1
max: 10
retries_delay:
description: Delay between each retry (in seconds, for rendering)
type: number
default: 300
min: 0
max: 3600
retries_output_action:
description: Retries in case of failures (for output action)
type: number
default: 5
min: 1
max: 10
retries_delay_output_action:
description: Delay between each retry (in seconds, for output action)
type: number
default: 120
min: 0
max: 3600
delay:
description: |
Job delay
This can be used to avoid triggering GitHub abuse mechanics on large workflows
type: number
default: 0
min: 0
max: 3600
# ====================================================================================
# 🚧 Options below are mostly used for testing
use_prebuilt_image:
description: |
Use pre-built docker image from [GitHub container registry](https://github.com/lowlighter/metrics/pkgs/container/metrics)
It allows to save build time and make job significantly faster, and there is almost no reason to disable this settings.
This option has no effects on forks (images will always be rebuilt from Dockerfile)
type: boolean
default: yes
testing: yes
preset: no
plugins_errors_fatal:
description: |
Fatal plugin errors
When enabled, the job will fail in case of plugin errors, else it will be handled gracefully in output with an error message
type: boolean
default: no
testing: yes
preset: no
debug:
description: |
Debug mode
This setting is automatically enable if a job fail (useful with `plugins_errors_fatal: yes`)
type: boolean
default: no
testing: yes
preset: no
verify:
description: SVG validity check
type: boolean
default: no
testing: yes
preset: no
debug_flags:
description: |
Debug flags
- `--cakeday`: simulate registration anniversary
- `--hireable`: simulate "Available for hire" account setting
- `--halloween`: enable halloween colors
- `--error`: force render error
type: array
format: space-separated
default: ""
values:
- --cakeday
- --hireable
- --halloween
- --error
testing: yes
preset: no
debug_print:
description: Print output in console
type: boolean
default: no
testing: yes
preset: no
dryrun:
description: |
Dry-run
Contrary to `output_action: none`, output file won't be available in `/metrics_renders` directory
type: boolean
default: no
testing: yes
preset: no
experimental_features:
description: |
Experimental features
No backward compatibility is guaranteed for these features
type: array
format: space-separated
default: ""
values:
- --optimize-svg
testing: yes
preset: no
use_mocked_data:
description: Use mocked data instead of live APIs
type: boolean
default: no
testing: yes
preset: no