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