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

GitHub Action

Run jq

v2.0.0

Run jq

crosshair

Run jq

Run jq on your data and get result as output

Installation

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

              

- name: Run jq

uses: sergeysova/[email protected]

Learn more about this action in sergeysova/jq-action

Choose a version

Run jq

Run jq on your data and get result as output

Inputs

cmd

Required This is the actual command that will be passed along

Outputs

value

This is the actual result of the command executing

Example usage

uses: r26d/jq-action@master
with:
  cmd: jq -n env

Using output

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    
      - name: Extract version from package.json
        uses: sergeysova@jq-action@v1
        id: version
        with:
          cmd: 'jq .version package.json -r'
      
      - name: Show my version
        run: 'echo "version ${{ steps.version.outputs.value }}"'