Skip to content

action-read-json

Actions
GitHub Action to load properties from a JSON file
v1.0.5
Latest
Star (2)

Read JSON Action

Read JSON file and set properties to output of github action steps.

This forked repo support json array comparing to the upper one. An example can be find here.

Usage

Examples:

Get properties

---
- name: get properties
  id: json_properties
  uses: ActionsTools/read-json-action@main
  with:
    file_path: "package.json"

- run: |
    echo ${{steps.json_properties.outputs.name}}
    echo ${{steps.json_properties.outputs.version}}

Get a specified property value with prop_path

---
- name: get specified property
  id: repository_type
  uses: ActionsTools/read-json-action@main
  with:
    file_path: "package.json"
    prop_path: "repository.type"

- run: |
    echo ${{steps.repository_type.outputs.value}}

action-read-json is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Action to load properties from a JSON file
v1.0.5
Latest

action-read-json is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.