From 2bb8a5978eeccd1ce2b20513e92a1629ad4e496a Mon Sep 17 00:00:00 2001 From: dharsanb Date: Tue, 18 Jun 2024 15:35:11 +0530 Subject: [PATCH] feat(semver): add support for semantic version as input --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ced1327..2feaba7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: ./ @@ -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 \ No newline at end of file + 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 \ No newline at end of file