Skip to content

Commit

Permalink
feat: version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Jun 18, 2024
1 parent 7d4a04b commit 48c64ec
Show file tree
Hide file tree
Showing 9 changed files with 1,229 additions and 1,299 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:

test-action:
name: GitHub Actions Test
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

strategy:
matrix:
Expand All @@ -54,27 +52,37 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

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

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


- name: Test Local Action
- 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
- 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
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

0 comments on commit 48c64ec

Please sign in to comment.