Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

jbutcher5/read-yaml

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read YAML

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

IO

Input and output variables used by read-yaml

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

on: [ push, pull_request ]

jobs:
  test-yaml-reader:
    runs-on: ubuntu-latest
    name: Test read-yaml
    steps:
      - uses: actions/checkout@v1

      - name: Run read-yaml action
        id: yaml-data
        uses: jbutcher5/read-yaml@main      # You may wish to replace main with a version tag such as '1.6' etc.
        with:
          file: './action.yml'          # File to read from
          key-path: '["runs", "using"]' # Access the runs key then the using key and retuns the value.

      - name: Display read-yaml output
        run: echo "${{ steps.yaml-data.outputs.data }}"

Contributing and Local Development

Check the CONTRIBUTING guidelines for information on how to contribute to read-yaml