Skip to content

Files

Latest commit

 

History

History

read-yaml

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Read YAML

A composite GitHub Action to read a yaml file from the current repository.

GitHub Action Usage

In your GitHub repository include this action in your workflows:

- id: read_yaml
  uses: conda/actions/read-yaml
  with:
    # [required]
    # the relative path (or URL) to the YAML file to read
    path: path/to/yaml.yml
    path: https://raw.githubusercontent.com/owner/repo/ref/path/to/yaml.yml

    # [optional]
    # the keys to the value to extract
    key: foo.bar.2.baz

# if key provided get the value itself
- run: echo ${{ steps.read_yaml.outputs.value }}

# if no key provided get the entire YAML
- run: echo ${{ fromJSON(steps.read_yaml.outputs.value)['key'] }}