-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
34 lines (31 loc) · 1.08 KB
/
Copy pathaction.yaml
File metadata and controls
34 lines (31 loc) · 1.08 KB
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
name: Tweak the JSON
description: Write, Update and Read values from a JSON file. Runs in it's own docker alpine container with nodejs.
author: shaneapowell
branding:
icon: box
color: blue
inputs:
action:
required: true
description: "Either 'read' or 'write'. If 'read' is specified, the value param is ignored. if 'write', the output value is returned."
filename:
required: true
description: "The filename to access."
field:
required: true
description: "The field to R/W. eg. Can be nested ['firstName'] will reference { 'firstName': 'john' }. ['user']['firstName'] will reference { 'user': { 'firstName': 'doe' } }"
value:
required: false
description: "The value to set to the file. Only used when the 'write' action is specified."
outputs:
value:
description: "The value either set or read from the json file. Both read and write actions return a value here."
runs:
using: docker
image: Dockerfile
args:
- /main.js
- "${{ inputs.action }}"
- "${{ inputs.filename }}"
- "${{ inputs.field }}"
- "${{ inputs.value }}"