{"id":16171639,"url":"https://github.com/jcwillox/install-tool-action","last_synced_at":"2025-03-19T00:30:41.389Z","repository":{"id":211725534,"uuid":"729818137","full_name":"jcwillox/install-tool-action","owner":"jcwillox","description":"Install any tool or binary with full cache, dynamic latest version, easy to configure and has presets.","archived":false,"fork":false,"pushed_at":"2025-03-11T07:12:49.000Z","size":366,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T08:23:30.092Z","etag":null,"topics":["actions","github","install-tool","setup-tool"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/install-tool","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcwillox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-10T13:06:17.000Z","updated_at":"2025-02-13T17:56:31.000Z","dependencies_parsed_at":"2024-05-01T04:27:17.552Z","dependency_job_id":"bb23771d-c8e8-4a5b-b529-15be412432a9","html_url":"https://github.com/jcwillox/install-tool-action","commit_stats":null,"previous_names":["jcwillox/install-tool-action"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcwillox%2Finstall-tool-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcwillox%2Finstall-tool-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcwillox%2Finstall-tool-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcwillox%2Finstall-tool-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcwillox","download_url":"https://codeload.github.com/jcwillox/install-tool-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955755,"owners_count":20374373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github","install-tool","setup-tool"],"created_at":"2024-10-10T03:43:43.564Z","updated_at":"2025-03-19T00:30:41.379Z","avatar_url":"https://github.com/jcwillox.png","language":"TypeScript","readme":"# Install Tool Action\n\n[![License](https://img.shields.io/github/license/jcwillox/install-tool-action?style=flat-square)](https://github.com/jcwillox/install-tool-action/blob/main/LICENSE)\n[![Version](https://img.shields.io/github/v/release/jcwillox/install-tool-action?style=flat-square)](https://github.com/jcwillox/install-tool-action/releases)\n[![Size](https://img.shields.io/github/size/jcwillox/install-tool-action/dist%2Findex.js?branch=main\u0026style=flat-square)](dist/index.js)\n[![Code style](https://img.shields.io/badge/code_style-biome-60a5fa?style=flat-square)](https://biomejs.dev)\n\nInstall any tool or binary with full cache, dynamic latest version, easy to configure and has presets.\n\n- Blazingly fast ⚡\n- Cache downloads using the tool cache 📦\n- Supports fetching and caching latest version dynamically 🚀\n- Can be configured to install almost any tool or binary 🛠️\n- Has built-in [presets](#presets) for common tools like 🧰\n\n## Usage\n\n```yaml\n- name: \"Checkout the repository\"\n  uses: actions/checkout@v4\n\n- name: \"Install Cloud SQL Proxy\"\n  id: install-tool\n  uses: jcwillox/install-tool-action@v1\n  with:\n    preset: \"cloud-sql-proxy\"\n\n- name: \"Show Outputs\"\n  run: |\n    echo \"path=${{ steps.install-tool.outputs.path }}\"\n    echo \"version=${{ steps.install-tool.outputs.version }}\"\n\n- name: \"Print Version\"\n  run: |\n    cloud-sql-proxy --version\n```\n\n## Inputs\n\n| Name            | Description                                                                                                                      | Default               |\n| --------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------- |\n| `preset`        | Preset to use, see [Presets](#presets)                                                                                           |                       |\n| `version`       | Version of the tool to install                                                                                                   | `latest`              |\n| `repo`          | Repository to use for defaults, see [Repository](#repository)                                                                    |                       |\n| `id`            | Id to use for tool cache when not using `preset` or `repo`                                                                       |                       |\n| `version_url`   | URL to fetch the latest version from, see [Version URL](#version-url)                                                            |                       |\n| `version_path`  | JSON path like expression to extract version from the response, see [radash.get](https://radash-docs.vercel.app/docs/object/get) |                       |\n| `version_regex` | Regex to extract the version from the response, see [Version URL](#version-url)                                                  | `(?\u003cversion\u003e[\\\\d.]+)` |\n| `download_url`  | URL to download the tool from, see [Download URL](#download-url)                                                                 |                       |\n| `download_name` | Rename downloaded binaries, does not work with archives, see [Download Name](#download-name)                                     |                       |\n| `bin_path`      | Sub-path of a downloaded archive to add to PATH                                                                                  |                       |\n| `cache`         | Set to `false` to disable use of the tool cache                                                                                  | `true`                |\n| `token`         | Token to use for GitHub requests                                                                                                 | `GITHUB_TOKEN`        |\n\n## Outputs\n\n| Name      | Description                                                                                   |\n| --------- | --------------------------------------------------------------------------------------------- |\n| `path`    | Path to the installed tool, will be the directory of the tool and does not include `bin_path` |\n| `version` | The resolved version of the tool                                                              |\n\n## Presets\n\n| Name              | URL                                                    |\n|-------------------|--------------------------------------------------------|\n| `infisical-cli`   | https://github.com/Infisical/infisical                 |\n| `cloud-sql-proxy` | https://github.com/GoogleCloudPlatform/cloud-sql-proxy |\n| `github-cli`      | https://github.com/cli/cli                             |\n\n## Custom Config\n\nSee [presets/index.ts](src/presets/index.ts) for examples of how to configure a custom tool.\n\nCustom presets are very simple to create, for example to the `infisical-cli` all you need to set is\n\n```yaml\nrepo: \"infisical/infisical\"\ndownload_url: \"/releases/download/infisical-cli/v{{version}}/infisical_{{version}}_{{os}}_{{arch}}.{{archive}}\"\n```\n\n### Repository\n\nSetting the `repo` input will set defaults for the tool, this includes\n\n- `version_url` - `https://api.github.com/repos/${repo}/releases/latest`\n- `version_path` - `tag_name`\n- `download_url` - when `download_url` starts with `/`, e.g. is a relative url\n  - `https://github.com/${repo}/${download_url}`\n\n### Version URL\n\nThe URL to fetch the latest version from defaults to `https://api.github.com/repos/${repo}/releases/latest` for GitHub repositories, this can be overridden using the `version_url` input.\n\nThe version can be extracted from the response using `version_path` and `version_regex`, the response payload is JSON [radash.get](https://radash-docs.vercel.app/docs/object/get) is used to extract the version from the response which is JSON-path like.\n\nAdditionally or alternatively you can use `version_regex` to extract the version from the response, or result from `version_path`, the regex can have a named capture group called `version` which will be used as the version, otherwise the entire match will be used. The regex defaults to `(?\u003cversion\u003e[\\\\d.]+)`.\n\n### Download URL\n\nThe `download_url` field supports templating, using [radash.template](https://radash-docs.vercel.app/docs/string/template), the following variables are available in addition to the inputs\n\n```ts\nconst templateArgs = {\n  ...config, // input values are merged\n  os: process.platform === \"win32\" ? \"windows\" : process.platform,\n  arch: process.arch === \"x64\" ? \"amd64\" : process.arch,\n  arch2: process.arch,\n  exe: process.platform === \"win32\" ? \".exe\" : \"\",\n  archive: process.platform === \"win32\" ? \"zip\" : \"tar.gz\",\n};\n```\n\nIf the downloaded file is an archive, it will be automatically extracted base on the extension, additionally the `bin_path` input can be used to specify a sub-path of the archive to add to PATH, it defaults to the root.\n\n### Download Name\n\nWhen downloading a binary (not an archive), you can rename the downloaded file using the `download_name` input, this is useful when the downloaded file has a version or arch in the name, e.g. `cloud-sql-proxy.linux.amd64` can be renamed to `cloud-sql-proxy` using `download_name: cloud-sql-proxy`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcwillox%2Finstall-tool-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcwillox%2Finstall-tool-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcwillox%2Finstall-tool-action/lists"}