Skip to content

(Yet Another) Setup yq

Actions
Installs the yq command-line YAML, JSON, XML, CSV and properties parser/processor on Linux, macOS and Windows runners
1.0.0
Latest
Star (4)

gha-setup-yq

Build License Contributor Covenant

Feedback and high-quality pull requests are highly welcome!

  1. What is it?
  2. Usage
  3. License

What is it?

gha-setup-yq is a GitHub action to install the yq command-line YAML, JSON, XML, CSV and properties parser/processor.

Usage

In your GitHub actions workflow specify:

Installing the latest version:

name: Build
on: [ push, pull_request ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Setup yq
      uses: vegardit/gha-setup-yq@v1

    - name: Use yq
      run: |
        yq --version
        echo 'greeting: "Hello World"' | yq -e ".greeting"

Installing a specific version:

name: Build
on: [ push, pull_request ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Setup yq 4.30.6
      uses: vegardit/gha-setup-yq@v1
      with:
        use-cache: true
        version: 4.30.6

    - name: Use yq
      run: |
        yq --version
        echo 'greeting: "Hello World"' | yq -e ".greeting"

Configuration parameters and default values

with:
  version: any    # yq version to install, possible values:
                  # - "any" -> meaning if jq is installed already or found in cache, then just use that version
                  # - "latest"
                  # - a version number, e.g. '4.30.8'
  use-cache: true # if the downloaded yq binary should be cached using the GHA caching service

License

All files are released under the Apache License 2.0.

Individual files contain the following tag instead of the full license text:

SPDX-License-Identifier: Apache-2.0

This enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.

(Yet Another) Setup yq is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Installs the yq command-line YAML, JSON, XML, CSV and properties parser/processor on Linux, macOS and Windows runners
1.0.0
Latest

(Yet Another) Setup yq is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.