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

Add support for semantic version as input #6

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,37 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Test Local Action
- name: Test Local Action (specific version)
uses: ./
with:
version: '0.12.0'
version: '0.13.1'

- name: Ensure humctl version 0.13.1 is installed
run: humctl version

- name: Test Local Action (latest minor)
uses: ./
with:
version: '0.13'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version

- name: Test Local Action (latest major)
uses: ./
with:
version: '0'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version

- name: Test Local Action (carot range)
uses: ./
with:
version: '^0'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

GitHub Action to set up the [Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/).


## Usage

```yaml
Expand All @@ -21,7 +20,8 @@ jobs:
uses: humanitec/setup-cli-action@v1
with:
# Check https://github.com/humanitec/cli/releases for available versions
version: "0.17.0"
version: "0.17.0" # Can be an exact version or a semver range https://github.com/npm/node-semver#ranges
token: ${{ secrets.GITHUB_TOKEN }} # Required if a range is specified
- run: humctl version

```
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
version:
description: 'CLI version to install'
required: true
token:
description: 'GitHub token (required if a version range is specified)'
required: false

outputs: {}

Expand Down
Loading