feature: install gh cli if not present #39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a check if the gh cli is available and installs it from source otherwise.
If you know that your system does not provide this binary, you can also customize the version to be installed. To do this, simply specify an environment variable named
GH_CLI_VERSION
and the version string. When you declare such a variable, make sure that you follow the vendor's semver principle and do not prefix the version with a "v".Example:
Why did I choose to install from sources?
Since I don't want to mess with keys and package managers, I decided to simplify this process and download the binary directly from the sources. Otherwise I would have to check which package manager is available, what the package name is and so on.
Closes: #38