forked from recih/template-render-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
43 lines (43 loc) · 1.65 KB
/
action.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
name: 'Template Render Action'
description: 'A github action to render ejs/mustache template files using github context.'
author: 'recih'
inputs:
template-file:
required: false
description: 'Input template file path. You must specify either a template file or a template string.'
template:
required: false
description: 'Input template string. You must specify either a template file or a template string.'
glob:
required: false
description: |
glob mode. You can render all files matching the glob pattern.
If true, the `template-file` will be considered as a glob pattern.
`template`/`output-file` will be ignored.
`content` field in action output will not be set.
The output file name will be the same as the input file name, without the file extension.
eg. 'data.json.template' will be rendered to 'data.json'
default: 'false'
vars:
required: false
description: 'Input variables. A dictionary of variables to be used in the template. Or specify a .yml/.yaml/.json file path.'
engine:
required: false
description: 'Template engine. Default is ejs. Currently supported: ejs, mustache.'
default: 'ejs'
options:
required: false
description: 'extra render options for the template engine.'
default: '{}'
output-file:
required: false
description: 'Output file path. If specified, the rendered template will be written to this file. Caution: If the file already exists, it will be overwritten.'
outputs:
content:
description: 'Output content. The rendered template.'
runs:
using: 'node16'
main: 'dist/index.js'
branding:
icon: 'file-text'
color: 'yellow'