Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: install gh cli if not present #39

Merged
merged 2 commits into from Jul 14, 2022

Conversation

leonsteinhaeuser
Copy link
Owner

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:

jobs:
  task:
    name: task
    runs-on: ubuntu-latest
    steps:
      - name: Do Something
        uses: leonsteinhaeuser/project-beta-automations@vX.X.X
        env:
           GH_CLI_VERSION: 2.8.0
        ...

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

@leonsteinhaeuser leonsteinhaeuser added the enhancement New feature or request label Apr 15, 2022
@leonsteinhaeuser leonsteinhaeuser self-assigned this Apr 15, 2022
@leonsteinhaeuser leonsteinhaeuser added the size/XS Denotes a PR that changes 0-99 lines, ignoring generated files. label Apr 15, 2022
@leonsteinhaeuser
Copy link
Owner Author

@calexandre please check if you are ok with this solution.

@codyhod
Copy link

codyhod commented Jul 11, 2022

@leonsteinhaeuser not the issue author but I'm running into the same issue. I would appreciate this being released :)

@leonsteinhaeuser leonsteinhaeuser merged commit b002600 into main Jul 14, 2022
1 check passed
@leonsteinhaeuser leonsteinhaeuser deleted the feature/install-gh-cli branch July 14, 2022 18:19
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this pull request Sep 1, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| booxmedialtd/ws-action-parse-semver | action | digest | `966a265` -> `e4a833c` |
| [leonsteinhaeuser/project-beta-automations](https://togithub.com/leonsteinhaeuser/project-beta-automations) | action | minor | `v1.2.1` -> `v1.3.0` |
| tubone24/update_release | action | digest | `3361270` -> `53849a6` |

---

### Release Notes

<details>
<summary>leonsteinhaeuser/project-beta-automations</summary>

### [`v1.3.0`](https://togithub.com/leonsteinhaeuser/project-beta-automations/releases/tag/v1.3.0)

[Compare Source](https://togithub.com/leonsteinhaeuser/project-beta-automations/compare/v1.2.1...v1.3.0)

#### What's Changed

-   feature: install gh cli if not present by [@&#8203;leonsteinhaeuser](https://togithub.com/leonsteinhaeuser) in [leonsteinhaeuser/project-beta-automations#39
-   feature: implemented `@current` and `@next` iteration selection by [@&#8203;leonsteinhaeuser](https://togithub.com/leonsteinhaeuser) in [leonsteinhaeuser/project-beta-automations#45

**Full Changelog**: leonsteinhaeuser/project-beta-automations@v1.2.1...v1.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODAuMCIsInVwZGF0ZWRJblZlciI6IjMyLjE4MC4wIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/XS Denotes a PR that changes 0-99 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support for self-hosted runners, where gh client might not be present
2 participants