Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 497 Bytes

File metadata and controls

23 lines (17 loc) · 497 Bytes

github-action-json-property

Get a specified property of a json file.

Usage

Use the action inside your workflow yaml file like this: https://lodash.com/docs/4.17.15#get

...
- name: get version
    id: version
    uses: kekedaine/[email protected]
    with:
        path: 'package.json'
        prop_path: 'keywords[0]' # version | scripts.build
        prop_path2: 'version' # version | scripts.build
- run: echo ${{steps.version.outputs.prop}}
...