commit a8891704b9321754ead3f603f0aa3c8a7a21b574 Author: Vlad Durnea Date: Sat Oct 31 08:51:23 2026 +0200 better-setup-jq v1: pinned static jq diff --git a/README.md b/README.md new file mode 100644 index 0000000..5a56931 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# better-setup-jq + +Pinned static `jq` — the one binary every gate script needs that no recipe mirror covers. +Static, so it runs on musl runner images with no package manager. + +```yaml +- uses: https://git.madapes.com/actions/better-setup-jq@v1 +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..3766ad5 --- /dev/null +++ b/action.yml @@ -0,0 +1,21 @@ +name: better-setup-jq +description: Install a pinned static jq binary — no package manager needed, Forgejo/act runner safe. +inputs: + jq-version: + description: Exact jq version to install (x.y.z). + default: "1.7.1" +runs: + using: composite + steps: + - shell: bash + run: | + set -euo pipefail + v="${{ inputs.jq-version }}" + case "$(uname -m)" in + x86_64|amd64) arch=amd64 ;; + aarch64|arm64) arch=arm64 ;; + *) echo "better-setup-jq: unsupported arch $(uname -m)" >&2; exit 1 ;; + esac + curl -fsSL -o /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/jq-${v}/jq-linux-${arch}" + chmod +x /usr/local/bin/jq + jq --version