Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StepSecurity Maintained Action

yq - GitHub Action

A GitHub Action that provides yq, a lightweight and portable command-line YAML, JSON, INI and XML processor. yq uses jq-like syntax but works with yaml files as well as json, xml, ini, properties, csv and tsv.

Usage

  - name: Set foobar to cool
    uses: step-security/mikefarah-yq@v4
    with:
      cmd: yq -i '.foo.bar = "cool"' 'config.yml'
  - name: Get an entry with a variable that might contain dots or spaces
    id: get_username
    uses: step-security/mikefarah-yq@v4
    with:
      cmd: yq '.all.children.["${{ matrix.ip_address }}"].username' ops/inventories/production.yml
  - name: Reuse a variable obtained in another step
    run: echo ${{ steps.get_username.outputs.result }}

Inputs

Input Description Required
cmd The yq command to run Yes

Outputs

Output Description
result The complete result from the yq command being run

See yq documentation for detailed usage of the yq tool itself.

About

yq is a portable command-line YAML, JSON, XML, CSV, TOML, HCL and properties processor. Secure drop-in replacement for mikefarah/yq.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages