A jq
utility for GitHub Actions
This is a simple, but useful, action for executing JSON queries with jq
.
---
name: format
on:
- pull_request
- push
jobs:
preflight:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout ${{ github.head_ref || github.ref_name }}
uses: actions/checkout@v5.0.0
with:
persist-credentials: false
ref: ${{ github.head_ref || github.ref }}
- id: version
name: Get dprint version
uses: flex-development/jq-action@1.0.0
with:
data: package.json
filter: .devDependencies.dprint
- id: check
name: Check formatting
uses: dprint/check@v2.3
with:
args: --config-discovery=false --incremental=false --log-level=info
config-path: .dprint.jsonc
dprint-version: ${{ steps.version.outputs.result }}
See
.github/workflows/test.yml
for more usage examples.
The data to operate on.
The filter to apply.
The simplest filter is .
, which copies jq
's input to its output unmodified (except for formatting).
For more advanced filters, see https://jqlang.github.io/jq/manual.
The command options to apply (optional).
default:
true
Shortcut for the raw output option, -r
.
With this option, if the result
of the filter
is a string, it will not be formatted as a JSON
string with escapes and quotes.
The result of the filter
.
flex-development/manver-action
— version metadata extraction utility
See CONTRIBUTING.md
.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.