forked from blablacar/action-config-levels
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
62 lines (62 loc) · 2.24 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: action-config-levels
description: Load configuration and merge it by redefinition levels
inputs:
patterns:
description: |
A list of path patterns to possible configuration files.
This field contains a string with a list in YAML format.
required: true
merge_object:
description: |
Way to merge objects [deep, overwrite, off].
- `deep` — merge objects deeply
- `overwrite` — overwrite objects that are at the root
- `off` — use the lowest level configuration file
Default: 'deep'.
default: deep
merge_array:
description: |
Way to merge arrays [concatenating, overwrite].
Also affects the type of array merge when merging objects.
Default: 'concatenating'.
default: concatenating
merge_plain:
description: |
Way to merge plain text [concatenating, overwrite].
Default: 'concatenating'.
default: concatenating
output_properties:
description: |
Output each property of the object as JSON.
Default: 'false'.
default: 'false'
loop:
description: |
If `loop` is defined, then the action is repeated as many times as the number of rows in the variable's content.
All found mentions of `{{ item }}` in the pattern are replaced with a row from the `loop` variable.
The iterative execution of the action returns the object as JSON, where the key contains a row,
and the value is the result of the execution of the action according to the pattern.
Also it has output for each row as a serialized key with value in JSON if `output_properties` is enabled.
loop_items_format:
description: |
The format in which the list is passed to the loop:
- `text` — each row is an item of a list
- `json` — list in JSON format
- `yaml` — list in YAML format
Default: 'text'.
default: text
loop_items_key:
description: |
Object path to the value that acts as the key.
Helps set the key by which the result will be available if the item contains an object.
Otherwise, the index is used as the key.
outputs:
result:
description: Merged configuration as JSON or plain text.
runs:
using: node12
main: dist/index.js
branding:
icon: layers
color: gray-dark