File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 14
14
with :
15
15
input-file : ' package.json'
16
16
input-property : ' author.name' # Exp: 'fiddlermikey'
17
- - name : read the variable
17
+ - name : Display property value for input-property in input-file
18
18
id : write
19
19
run : echo "The value for ${{ steps.read.outputs.output-property }} is ${{ steps.read.outputs.output-value }}"
20
20
Original file line number Diff line number Diff line change
1
+ # Assign workflow properties from json
2
+
3
+ This action is designed to read a json file and set workflow variables using properties defined in the json file
4
+
5
+ ## Inputs
6
+
7
+ ### ` input-property `
8
+
9
+ ** Required** The identifier of the json property to be evaluated
10
+
11
+ ## Outputs
12
+
13
+ ### ` output-value `
14
+
15
+ The value from the json property
16
+
17
+ ## Example usage
18
+
19
+ ``` yaml
20
+ jobs :
21
+ assign-from-json :
22
+ runs-on : ubuntu-latest
23
+ name : A test job to read a value from json as a variable
24
+ steps :
25
+ - name : Read a json file
26
+ uses : ./
27
+ id : read
28
+ with :
29
+ input-file : ' package.json'
30
+ input-property : ' author.name' # Exp: 'fiddlermikey'
31
+ - name : Display property value for input-property in input-file
32
+ id : write
33
+ run : echo "The value for ${{ steps.read.outputs.output-property }} is ${{ steps.read.outputs.output-value }}"
34
+
35
+ ```
You can’t perform that action at this time.
0 commit comments