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

GitHub Action

TOML Reader

v1.0.2

TOML Reader

file-text

TOML Reader

Read a specific field from a TOML file

Installation

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

              

- name: TOML Reader

uses: SebRollen/[email protected]

Learn more about this action in SebRollen/toml-action

Choose a version

Read TOML

A simple action to read a single field from a TOML file and output the value stored in that field.

Inputs

file

Required The TOML file to read from.

field

Required The field inside the TOML file to read. Can possibly be a nested field, using the parent.child notation.

Outputs

value

The value stored inside file at key field.

Example usage

uses: SebRollen/[email protected]
id: read_toml
with:
  file: 'myfile.toml'
  field: 'package.version'

You can now refer to the output in a later step using steps.read_toml.outputs.value