better-setup-just v1: static pinned install, no GitHub API probe (Forgejo-runner safe)
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
# better-setup-just
|
||||||
|
|
||||||
|
Own fork of the setup-just recipe for git.madapes.com runners. Installs a **pinned** `just`
|
||||||
|
by downloading the release tarball directly — the upstream action resolves versions through
|
||||||
|
api.github.com with the runner's `GITHUB_TOKEN`, which on Forgejo is an instance token and
|
||||||
|
answers `Bad credentials`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: https://git.madapes.com/actions/better-setup-just@v1
|
||||||
|
with: { just-version: "1.40.0" } # pin; defaults to the tested version
|
||||||
|
```
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
name: better-setup-just
|
||||||
|
description: Install a pinned just binary statically from its GitHub release asset — no GitHub
|
||||||
|
API call and no token, so it works on Forgejo/act runners where the runner's GITHUB_TOKEN is
|
||||||
|
an instance token (upstream setup-just probes api.github.com and fails: Bad credentials).
|
||||||
|
inputs:
|
||||||
|
just-version:
|
||||||
|
description: Exact just version to install (x.y.z).
|
||||||
|
default: "1.40.0"
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
v="${{ inputs.just-version }}"
|
||||||
|
case "$(uname -m)" in
|
||||||
|
x86_64|amd64) arch=x86_64 ;;
|
||||||
|
aarch64|arm64) arch=aarch64 ;;
|
||||||
|
*) echo "better-setup-just: unsupported arch $(uname -m)" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
curl -fsSL "https://github.com/casey/just/releases/download/${v}/just-${v}-${arch}.tar.gz" \
|
||||||
|
| tar -xz -C /usr/local/bin just
|
||||||
|
just --version
|
||||||
Reference in New Issue
Block a user