- Shell 67.3%
- PowerShell 32.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Add 1.8.1 and 1.8.2 to the test-linux and test-container matrices. - Bump default version in action.yaml from 1.7.1 to 1.8.2. - Update README tested-version list and default snippet. - Update example workflow dispatch defaults to 1.8.2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
| .github | ||
| scripts | ||
| tests/unit | ||
| .gitignore | ||
| action.yaml | ||
| LICENSE | ||
| README.md | ||
install-jq-action
Multiplatform jq installer action
This action is tested against the following versions of jq:
Modern releases (jqlang/jq — 1.7+)
Legacy releases (stedolan/jq — 1.5 and 1.6)
Index
Examples
Action Inputs
version
version:
required: false
description: "Version of jq to install"
default: "1.8.2"
Must be a dot-separated numeric version string (e.g. 1.7.1, 1.8.0).
- 1.7 and newer are downloaded from the jqlang/jq repository and
support a wider set of architectures:
amd64,arm64,armhf,armel, andi386. - 1.5 and 1.6 are downloaded from the legacy stedolan/jq repository
and support
linux32,linux64, andosx-amd64.
force
force:
required: false
description: "If 'true', does not check for existing jq installation before continuing."
default: 'false'
GitHub's own hosted runners come with a version of jq pre-installed.
Setting this to true will install the version you specify into the tool cache, superseding the preinstalled version.
Setting this to true can also help ensure the same version is used across both self-hosted and remote runners.
Action Outputs
found
found:
description: "If 'true', jq was already found on this runner"
installed
installed:
description: "If 'true', jq was installed by this action"
Security
Starting with v4 this action performs integrity verification on every download:
- jq 1.7 and newer: the binary's SHA-256 digest is checked against the release's
sha256sum.txtbefore it is installed. The install fails if the digest does not match. If nosha256sum.txtis published for a release (e.g. the original jq 1.7.0 tag) a warning is printed and installation continues. - jq 1.5 / 1.6 (legacy): no checksum file is published by the upstream
stedolan/jqproject, so no verification is performed.
curl is hardened with --fail so that HTTP error responses (4xx/5xx) abort the download rather than writing
the error page to disk as the binary.
All four install scripts validate the version input against the pattern ^[0-9]+\.[0-9]+(\.[0-9]+)*$ and
reject malformed values (including path-traversal attempts) before constructing any download URL.