better-setup-jq v1: pinned static jq
This commit is contained in:
@@ -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
|
||||
```
|
||||
+21
@@ -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
|
||||
Reference in New Issue
Block a user