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/[email protected]
with:
persist-credentials: false
ref: ${{ github.head_ref || github.ref }}
- id: version
name: Get dprint version
uses: flex-development/[email protected]
with:
data: package.json
filter: .devDependencies.dprint
- id: check
name: Check formatting
uses: dprint/[email protected]
with:
args: --config-discovery=false --incremental=false --log-level=info
config-path: .dprint.jsonc
dprint-version: ${{ steps.version.outputs.result }}See
.github/workflows/test.ymlfor 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.