commit f81727e540b0d692edd821f85acf1effa1af6fbe Author: Vlad Durnea Date: Sat Oct 31 08:38:51 2026 +0200 better-setup-just v1: static pinned install, no GitHub API probe (Forgejo-runner safe) diff --git a/README.md b/README.md new file mode 100644 index 0000000..2e0d211 --- /dev/null +++ b/README.md @@ -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 +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..3f1b840 --- /dev/null +++ b/action.yml @@ -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