{"id":20189390,"url":"https://github.com/redhat-actions/openshift-tools-installer","last_synced_at":"2025-03-03T09:07:36.728Z","repository":{"id":40547516,"uuid":"327990542","full_name":"redhat-actions/openshift-tools-installer","owner":"redhat-actions","description":"Download, install and cache OpenShift binaries into your GitHub Actions runners.","archived":false,"fork":false,"pushed_at":"2024-08-30T11:02:46.000Z","size":19376,"stargazers_count":24,"open_issues_count":11,"forks_count":24,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-24T08:09:36.735Z","etag":null,"topics":["camel-k","chart-verifier","crc","crda","helm","installer","kam","knative","kustomize","oc","odo","openshift","openshift-mirror","operator-sdk","opm","redhat","s2i","tekton","yq"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/openshift-tools-installer","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/redhat-actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-01-08T19:11:53.000Z","updated_at":"2024-12-12T18:55:48.000Z","dependencies_parsed_at":"2024-03-08T07:40:31.170Z","dependency_job_id":"5ccc0029-f364-43ca-a62f-4192ced60f3c","html_url":"https://github.com/redhat-actions/openshift-tools-installer","commit_stats":{"total_commits":122,"total_committers":9,"mean_commits":"13.555555555555555","dds":0.540983606557377,"last_synced_commit":"144527c7d98999f2652264c048c7a9bd103f8a82"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fopenshift-tools-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fopenshift-tools-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fopenshift-tools-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fopenshift-tools-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-actions","download_url":"https://codeload.github.com/redhat-actions/openshift-tools-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241570817,"owners_count":19984001,"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":["camel-k","chart-verifier","crc","crda","helm","installer","kam","knative","kustomize","oc","odo","openshift","openshift-mirror","operator-sdk","opm","redhat","s2i","tekton","yq"],"created_at":"2024-11-14T03:36:36.679Z","updated_at":"2025-03-03T09:07:36.707Z","avatar_url":"https://github.com/redhat-actions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift Tools Installer Action\n\n[![CI Checks](https://github.com/redhat-actions/openshift-tools-installer/workflows/CI%20Checks/badge.svg)](https://github.com/redhat-actions/openshift-tools-installer/actions?query=workflow%3A%22CI+Checks%22)\n[![Install from Mirror Example](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/example_mirror.yml/badge.svg)](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/example_mirror.yml)\n[![Install from GitHub Example](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/example_github.yml/badge.svg)](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/example_github.yml)\n[![Link checker](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/link_checker.yml/badge.svg)](https://github.com/redhat-actions/openshift-tools-installer/actions/workflows/link_checker.yml)\n\n[![tag badge](https://img.shields.io/github/v/tag/redhat-actions/openshift-tools-installer)](https://github.com/redhat-actions/openshift-tools-installer/tags)\n[![license badge](https://img.shields.io/github/license/redhat-actions/openshift-tools-installer)](./LICENSE)\n\n**openshift-tools-installer** is a GitHub Action that downloads, installs and caches OpenShift and Kubernetes related CLI tools from the [OpenShift Mirror](https://mirror.openshift.com/pub/openshift-v4/clients/) or from GitHub Releases, allowing you to easily use these tools in your Action workflows.\n\n- Leverages the Actions cache so subsequent downloads are lightning fast\n- Supports all 3 major operating systems\n- Effective on a GitHub runner, or a self-hosted runner\n- Semver support allows total version flexibility\n\n\u003ca id=\"supported-tools\"\u003e\u003c/a\u003e\n\n## Supported Tools\n\nBelow is the list of supported tools that can be installed from the [OpenShift Mirror](https://mirror.openshift.com/pub/openshift-v4/clients/) or from GitHub.\n\n| Name | Description | OpenShift Mirror | GitHub | Supported OS\n| ---- | ----------- | --------- | ---------- | ----- |\n| [`crc`](https://github.com/code-ready/crc) | CodeReady Containers | ✔️ [crc](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/crc/) | ❌ | Linux \u0026 Windows\n| [`crda`](https://github.com/fabric8-analytics/cli-tools) | CodeReady Dependency Analytics | ❌ | ✔️ [fabric8-analytics/cli-tools](https://github.com/fabric8-analytics/cli-tools/blob/main/docs/cli_README.md) | All\n| [`helm`](https://github.com/helm/helm) | Helm | ✔️ [helm](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/helm) | ❌ | All\n| [`kam`](https://github.com/redhat-developer/kam) | GitOps Application Manager | ✔️ [kam](https://mirror.openshift.com/pub/openshift-v4/clients/kam/) | ✔️ [redhat-developer/kam](https://github.com/redhat-developer/kam) | All\n| [`kamel`](https://github.com/apache/camel-k) | Camel K | ✔️ [camel-k](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/camel-k) | ✔️ [apache/camel-k](https://github.com/apache/camel-k) | All\n| [`kn`](https://github.com/knative/client)| Knative Client | ✔️ [serverless](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/serverless) | ✔️ [knative/client](https://github.com/knative/client) | All\n| [`kustomize`](https://github.com/kubernetes-sigs/kustomize) | Kustomize | ❌ | ✔️ [kubernetes-sigs/kustomize](https://github.com/kubernetes-sigs/kustomize) | All\n| [`oc`](https://github.com/openshift/oc) | OpenShift Client | ✔️ [v3](https://mirror.openshift.com/pub/openshift-v3/clients/) and [ocp (v4)](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/) | ❌ | All\n| [`odo`](https://github.com/openshift/odo) | OpenShift Do | ✔️ [odo](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/odo/) | ❌ | All\n| [`openshift-install`](https://github.com/openshift/installer) | OpenShift Installer | ✔️ [ocp](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/) | ❌ | Linux \u0026 macOS\n| [`operator-sdk`](https://github.com/operator-framework/operator-sdk) | Operator SDK | ✔️ [operator-sdk ](https://mirror.openshift.com/pub/openshift-v4/clients/operator-sdk) | ✔️ [operator-framework/operator-sdk](https://github.com/operator-framework/operator-sdk) | Linux \u0026 macOS\n| [`opm`](https://github.com/operator-framework/operator-registry) | Operator Package Manager | ✔️ [ocp](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/) | ✔️ [operator-framework/operator-registry](https://github.com/operator-framework/operator-registry) | All*️\n| [`s2i`](https://github.com/openshift/source-to-image) | Source to Image| ❌ | ✔️ [openshift/source-to-image](https://github.com/openshift/source-to-image) | All\n| [`tkn`](https://github.com/tektoncd/cli) | Tekton Pipelines Client | ✔️ [pipeline](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/pipeline) | ✔️ [tektoncd/cli](https://github.com/tektoncd/cli) | All\n| [`yq`](https://github.com/mikefarah/yq) | yq | ❌ | ✔️ [mikefarah/yq](https://github.com/mikefarah/yq) | All\n| [`chart-verifier`](https://github.com/redhat-certification/chart-verifier) | Chart Verifier | ❌ | ✔️ [redhat-certification/chart-verifier](https://github.com/redhat-certification/chart-verifier) | Linux\n| [`ko`](https://github.com/google/ko) | ko | ❌ | ✔️ [google/ko](https://github.com/google/ko) | All\n| [`preflight`](https://github.com/redhat-openshift-ecosystem/openshift-preflight) | preflight | ❌ | ✔️ [redhat-openshift-ecosystem/openshift-preflight](https://github.com/redhat-openshift-ecosystem/openshift-preflight) | Linux\n\n\u003e *️ For Mirror: OPM versions less than `4.6.17` are only available for Linux.\u003cbr\u003e\n\u003e For GitHub: OPM versions less than `1.15.1` are only available for Linux. \u003cbr\u003e\n\u003e Note that OPM versions on the OpenShift Mirror are versioned by the OCP version, not the OPM executable version. \u003cbr\u003e\n\u003e Note that the chart verifier binaries are only available starting with version `1.4.1`\n\n## Inputs\n\u003c!-- markdown-link-check-disable --\u003e\n| Input | Description | Default |\n| ----- | ----------- | ------- |\n| source | Source from which to download all tools in the step. Can be `github` or `mirror`. If you want to download tools from both sources, use two steps. | `mirror`\n| github_pat | GitHub personal access token. This is required if the `source` input is `github`. It can be a personal access token, but it is easiest to use the built-in `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}`. See [GitHub docs](https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret) for details about the built-in token. | `${{ github.token }}` |\n| skip_cache | Set to `true` to skip caching of the downloaded executables. This will also skip fetching previously cached executables. | `false`\n\u003c!-- markdown-link-check-disable --\u003e\n\nThe other inputs are just the names of the supported tools, exactly as listed above. The value for each input is a [semantic version](https://docs.npmjs.com/cli/v6/using-npm/semver#versions) or [range](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges) for that tool. If the version given is a range, this action will install the **maximum** version that satisfies the range.\n\nVersion numbers must be **quoted**, so the yaml parser interprets them as strings.\n\nThe version can also be `\"*\"`, or `\"latest\"`, which are the same. This installs the latest release that is available on the selected source.\n\nFor a list of available versions of a given tool, follow the links in the [Supported Tools table](#supported-tools) for the selected source, and look at the versions available.\n\nIf an invalid version is specified, the action will not proceed with any installations.\n\nIf the requested version is valid but not available on the mirror, the action fails, but any tools that were found will still be installed and cached.\n\n## Example\n\nHere is an workflow step demonstrating some example version inputs.\n\nAlso see [the OpenShift Mirror example workflow](./.github/workflows/example_mirror.yml), and [the GitHub example workflow](./.github/workflows/example_github.yml).\n\nRefer to the [semver documentation](https://docs.npmjs.com/cli/v6/using-npm/semver#versions). The action uses the `semver` package, so all syntax is supported.\n\n```yaml\nsteps:\n  - name: Install CLI tools from OpenShift Mirror\n    uses: redhat-actions/openshift-tools-installer@v1\n    with:\n\n      # \"mirror\" is the default source, so this is optional.\n      source: \"mirror\"\n\n      # Installs the latest kam release.\n      kam: \"latest\"\n\n      # Installs the latest release of oc with the major version 3.\n      # This is equivalent to \"3.x\" or \"^3\".\n      oc: \"3\"\n\n      # Installs the latest release of odo with the major version 2, and the minor version 0.\n      # This would install odo 2.0.3, but not odo 2.1.0.\n      odo: \"2.0\"\n\n      # This exact version will install version 0.11.0 of Tekton, no other version.\n      tkn: \"0.11.0\"\n\n  - name: Install CLI tools from GitHub\n    uses: redhat-actions/openshift-tools-installer@v1\n    with:\n      # Search through these projects' GitHub releases, instead of the OpenShift Mirror.\n      # https://docs.github.com/en/actions/reference/authentication-in-a-workflow\n      source: \"github\"\n\n      # Using GitHub token from the github context\n      github_pat: ${{ github.token }}\n\n      kam: \"latest\"\n      s2i: \"1.2\"\n      tkn: \"0.17\"\n```\n\n## Outputs\nThe action has one output called `installed`, which is a JSON object that maps tool names (as above) to an object describing the version that was installed.\n\nFor example, after installing `oc` with the version range \"4.3\", the output object contains:\n```js\n{\n    // ... other items omitted\n    oc: {\n        fromCache: true,\n        installedPath: \"/home/runner/work/_temp/openshift-bin/oc\",\n        url: \"https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.3.40/openshift-client-linux-4.3.40.tar.gz\",\n        version: \"4.3.40\"\n    }\n}\n```\n\nIf a CLI was not installed due to an error, it will be absent from this object. Check the action output and workflow summary for the error.\n\n## Caching\nThe executables are cached after being download and extracted. The cache key is determined by the source, the tool name, and the actual version that was downloaded - not the range that was input.\n\nThis means that if a new version is released that satisfies the version range, the cached old version will be bypassed in favour of the new version which is then cached. The upgrade is done for you, so long as the version range allows it.\n\nSee the [actions/cache](https://github.com/actions/cache) repository for cache limits.\n\nThe cache can be disabled for the current action run by setting the `skip_cache` input to `true`.\n\n### Caching on GHES\n\nThe Actions cache is not supported on GitHub Enterprise Server, as per [this issue](https://github.com/actions/cache/issues/505).\n\nThe cache is disabled in this action if you are using GitHub Enterprise Server.\n\n## Troubleshooting\n\n- If your installation is failing because the requested tool or version is not found:\n  - Check if the requested tool is available on the provided OS.\n  - Follow the links in the output to make sure the download exists, and check that your inputs match.\n\n  If it does exist and the action doesn't find it, or if you believe it should exist but does not, then open a bug.\n\u003c!-- markdown-link-check-disable-next-line --\u003e\n\n- If you hit the API rate limit, refer [GitHub API rate limit docs](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).\n\n- If you are using a custom runner, and that runner is using an alpine container image, you may need to first install an alpine package, and then you are able to install the `oc` binary. You will notice by receiving `file not found` errors while runner execution.\n ```\n   - run: |\n     apk add gcompat\n ```\n - - gcompat is needed to be installed for alpine images for compatibility between environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-actions%2Fopenshift-tools-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-actions%2Fopenshift-tools-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-actions%2Fopenshift-tools-installer/lists"}