Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
book

GitHub Action

Read yaml

1.5

Read yaml

book

Read yaml

Read data from a YAML file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Read yaml

uses: jbutcher5/read-yaml@1.5

Learn more about this action in jbutcher5/read-yaml

Choose a version

Read YAML

This action reads yaml data from a file and outputs the result.

Inputs


  • file Required yaml file to read from.

  • key-path Required Path of keys to the value as a JSON list.

Outputs


  • data Data read from YAML file.

Example usage

name: Read YAML Data
uses: KJ002/read-yaml@v1.5
id: yaml-data
with:
  file: './action.yaml'
  key-path: '["runs", "using"]' # Access the runs key then the using key and retuns the value.