diff --git a/.github/actions/nm-get-docker-tags/action.yml b/.github/actions/nm-get-docker-tags/action.yml index eace804698909..c7b9cf85e69e7 100644 --- a/.github/actions/nm-get-docker-tags/action.yml +++ b/.github/actions/nm-get-docker-tags/action.yml @@ -5,7 +5,7 @@ inputs: description: "type of nm-vllm to install for the docker image: NIGHTLY or RELEASE" required: true whl: - description: "wheel name, if latest use the latest from nm pypi" + description: "name of nm-vllm wheel to install for the docker image" required: true outputs: tag: @@ -24,14 +24,21 @@ runs: run: | BUILD_VERSION=`echo "${{ inputs.whl }}" | cut -d'-' -f2` if [[ "${{ inputs.wf_category }}" == "RELEASE" ]]; then - TAG="v${BUILD_VERSION}" - EXTRA_TAG=latest + if [[ "${BUILD_VERSION}" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then + TAG="v${BUILD_VERSION}" + EXTRA_TAG=latest + else + echo "ERROR: wheel version ${BUILD_VERSION} doesn't match RELEASE format. Check input." + exit 1 + fi else - TAG=`echo "${BUILD_VERSION}" | cut -d'.' -f4` - EXTRA_TAG=nightly - fi - if [[ "${{ inputs.whl }}" == "latest" ]]; then - BUILD_VERSION="latest" + if [[ "${BUILD_VERSION}" =~ ^[0-9]+.[0-9]+.[0-9]+.[0-9]{8}$ ]]; then + TAG=`echo "${BUILD_VERSION}" | cut -d'.' -f4` + EXTRA_TAG=nightly + else + echo "ERROR: wheel version ${BUILD_VERSION} doesn't match NIGHTLY format. Check input." + exit 1 + fi fi echo "tag=${TAG}" >> $GITHUB_OUTPUT echo "extra_tag=${EXTRA_TAG}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/nm-build-test.yml b/.github/workflows/nm-build-test.yml index 831af771f0aa9..7f13c58b427e4 100644 --- a/.github/workflows/nm-build-test.yml +++ b/.github/workflows/nm-build-test.yml @@ -173,8 +173,7 @@ jobs: # update docker DOCKER: - needs: [BUILD, UPLOAD] - if: ${{ inputs.push_to_pypi }} + needs: [BUILD] uses: ./.github/workflows/publish-docker.yml with: push_to_repository: ${{ inputs.push_to_pypi }}