diff --git a/setup-knative/action.yaml b/setup-knative/action.yaml index 2e70d030..1f2b9224 100644 --- a/setup-knative/action.yaml +++ b/setup-knative/action.yaml @@ -96,7 +96,8 @@ runs: elif [ "${REPO}" == "eventing" -a "${{ inputs.eventing-version }}" != "" ]; then REAL_KNATIVE_VERSION="knative-v${{ inputs.eventing-version }}" elif [ ${{ inputs.version }} == "latest" ]; then - REAL_KNATIVE_VERSION=$(git ls-remote --tags --refs https://github.com/knative/${REPO} | awk '{print $2}' | sed 's/refs\/tags\/.*v//g' | sort -V | tail -1) + VERSION=$(git ls-remote --tags --refs https://github.com/knative/${REPO} | awk '{print $2}' | sed 's/refs\/tags\/.*v//g' | sort -V | tail -1) + REAL_KNATIVE_VERSION="knative-v${VERSION}" # It will match only if the input is something like `1.2.x` if there is any trailing chars (`1.2.xa`) that will not match elif [[ ${{ inputs.version }} == *".x" ]]; then INPUT=$(echo ${{ inputs.version }} | sed 's/.x//g')