Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
only push can be disabled, always run build
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuangnm authored and dhuangnm committed Jul 3, 2024
1 parent ce3878d commit b577a99
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
23 changes: 15 additions & 8 deletions .github/actions/nm-get-docker-tags/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nm-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit b577a99

Please sign in to comment.