Action — install-tool
Installs one of the tools this repository's actions download, at the version pinned in the action's tools.json, after checking the download against the SHA-256 (or commit) pinned next to it. The actionlint, bats, check-docs-external-links, kubeconform, secret-scan, setup-claude-code and shellcheck actions call it.
It is internal: it installs the tools of its manifest only, and takes no URL or version from the caller. A version chosen by the caller could not be checked against a pinned checksum.
Usage
yaml
steps:
- uses: KevinDeBenedetti/github-workflows/.github/actions/install-tool@main
with:
tool: shellcheck
- run: shellcheck --versionInputs
| Input | Default | Description |
|---|---|---|
tool | (required) | The tool to install: actionlint, bats, claude-code, gitleaks, kubeconform, lychee or shellcheck |
Steps
- Read the tool's entry in
tools.jsonand pick the release asset for the runner (amd64orarm64) - Download it, with retries, and check it against the pinned SHA-256: a mismatch installs nothing
- Take the program out of its archive into
$RUNNER_TEMP/<tool> - Add that directory to
PATH
Bats is a git install instead: its release tag is cloned, the clone is checked against the pinned commit, and its own installer runs.
Notes
- Needs
bash,python3(reads the manifest and opens.tar.xzarchives),curl,sha256sumandtaron the runner, andgitfor Bats. No checkout, nosudo. - Linux runners,
amd64orarm64. - The manifest,
.github/actions/install-tool/tools.json, is the only place a pin lives. Renovate bumps a version there; CI then fails closed untilscripts/update-tool-checksums.pyrefreshes the checksums. - The
CI — Tool checksumsjob downloads every asset again for both architectures when the manifest changes; the installs of this repository's CI proveamd64.