anelson/Setup cgx
Install the cgx CLI, put it on PATH, and optionally prefetch tools to warm cgx's cache. Prefers prebuilt binaries, but falls back to building from source in the (unlikely) event that no suitable prebuilt binary exists for the runner's OS/architecture.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| version | cgx version to install, e.g. "0.0.11" or "v0.0.11" (a leading "v" is optional). Defaults to the latest release. | no | latest |
| target | Rust target triple to install (e.g. x86_64-unknown-linux-musl). Defaults to auto-detecting the runner's native target. When set, the action downloads that exact prebuilt archive instead of using the cargo-dist installer's auto-detection. | no | "" |
| cargo-cgx | Also install the `cargo-cgx` binary (the `cargo cgx ...` subcommand). | no | false |
| github-token | Token used to authenticate downloads (and prefetch-related GitHub lookups), avoiding anonymous rate limits. Defaults to the workflow token. | no | ${{ github.token }} |
| cache | Cache cgx's on-disk state (resolve cache + downloaded tool binaries) across runs. Restored before your steps and saved after the job. Set to "false" to disable. | no | true |
| cache-key-prefix | Prefix for the cache key. | no | cgx |
| app-dir | Directory for cgx's app state, exported as CGX_APP_DIR for all later steps. Defaults to a stable per-runner path under the runner tool cache. | no | "" |
| prefetch-all | After install, run `cgx --prefetch-all` to prepare every tool/alias in the repository's cgx.toml. Failures are logged as warnings and never fail the build. | no | true |
| prefetch | After install, prefetch these crate specs (one per line), e.g. "ripgrep@14". Each runs `cgx --prefetch <spec>`. Failures are logged as warnings and never fail the build. | no | "" |
Outputs
| name | description |
|---|---|
| version | The requested cgx version (normalized; "latest" or "vX.Y.Z"). |
| cgx-version | The concrete version reported by `cgx --version` after install. |
| path | Absolute path to the installed cgx binary. |
| app-dir | The CGX_APP_DIR used for cgx's state. |