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

GitHub Action

Get YML Paths

v0.0.3

Get YML Paths

box

Get YML Paths

A GitHub Action to access values of YAML files

Installation

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

              

- name: Get YML Paths

uses: CumulusDS/[email protected]

Learn more about this action in CumulusDS/get-yaml-paths-action

Choose a version

Get YAML Paths

This action reads a YAML file and outputs selected properties.

The action uses lodash.get to access properties at the provided paths. The file input is the only required input. All other inputs are mapped into equally named outputs with the value at the given paths.

Inputs

file

Required The name of the file to load.

name: path

Give each path to look-up as a name: path input pair.

Outputs

The Action generates an output for name with the value at the corresponding path. Output names are all lowercase, due to limitations in GitHub Actions.

Example usage

Given an input file file.yml:

foo:
  bar: baz
provider:
  stage: green

A step definition like this:

uses: @[email protected]
with:
  file: file.yml
  bar: foo.bar
  providerStage: provider.stage

sets the baz output to bar and sets the providerstage output (note all lower-case) to green.

See Also

get-json-paths-action

Development

License

This package is MIT licensed.