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 1414 with :
1515 input-file : ' package.json'
1616 input-property : ' author.name' # Exp: 'fiddlermikey'
17- - name : read the variable
17+ - name : Display property value for input-property in input-file
1818 id : write
1919 run : echo "The value for ${{ steps.read.outputs.output-property }} is ${{ steps.read.outputs.output-value }}"
2020
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