Skip to content

Commit

Permalink
feat(semver): add support for semantic version as input
Browse files Browse the repository at this point in the history
  • Loading branch information
dharsanb committed Jun 18, 2024
1 parent 48ae59a commit 2bb8a59
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,19 @@ jobs:
with:
version: '0.13.1'

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

- name: Ensure correct version is installed
id: check_output
if: "!contains( steps.humctl_version_0_13_1.outputs.result, 'humctl version 0.13.1')"
run: exit 1
run: |
# Check the installed humctl version
INSTALLED_VERSION=$(humctl version | awk '{print $3}')
echo "Installed humctl version: $INSTALLED_VERSION"
# Set the output for comparison
echo "::set-output name=installed_version::$INSTALLED_VERSION"
- name: Ensure humctl version 0.13.1 is installed
if: steps.humctl_version_0_13_1.outputs.installed_version != '0.13.1'
run: echo "Installed version (${{ steps.humctl_version_0_13_1.outputs.installed_version }}) does not match the expected version (0.13.1)."
exit 1

- name: Test Local Action
uses: ./
Expand All @@ -75,9 +80,14 @@ jobs:

- name: Ensure humctl is installed
id: humctl_version_0_13
run: humctl version

- name: Ensure correct version is installed
id: check_output
if: "!contains( steps.humctl_version_0_13.outputs.result, 'humctl version 0.13.7')"
run: exit 1
run: |
# Check the installed humctl version
INSTALLED_VERSION=$(humctl version | awk '{print $3}')
echo "Installed humctl version: $INSTALLED_VERSION"
# Set the output for comparison
echo "::set-output name=installed_version::$INSTALLED_VERSION"
- name: Ensure humctl version 0.13.7 is installed
if: steps.humctl_version_0_13.outputs.installed_version != '0.13.7'
run: echo "Installed version (${{ steps.humctl_version_0_13.outputs.installed_version }}) does not match the expected version (0.13.7)."
exit 1

0 comments on commit 2bb8a59

Please sign in to comment.