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

Commit fdd9a31

Browse files
dhuangnmdhuangnm
andauthored
add latest tag for release docker image (#279)
Need to tag the latest for the release docker image --------- Co-authored-by: dhuangnm <[email protected]>
1 parent bd14cbd commit fdd9a31

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/actions/nm-build-docker/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ inputs:
66
type: string
77
required: true
88
build_type:
9-
description: "type of nm-vllm to install for the docker image: nightly (default) or release"
9+
description: "type of nm-vllm to install for the docker image: NIGHTLY (default) or RELEASE"
1010
type: string
11-
default: 'nightly'
11+
default: 'NIGHTLY'
1212
build_version:
1313
description: "version of nm-vllm to install for the docker image: latest (default) or specific version e.g. 0.4.0, 0.4.0.20240531"
1414
type: string
@@ -27,6 +27,11 @@ runs:
2727
--build-arg build_type=${{ inputs.build_type }} \
2828
--build-arg build_version=${{ inputs.build_version }} \
2929
--target vllm-openai . || status=$?
30+
if [ ${status} -eq 0 ] && [[ "${build_type}" = "RELEASE" ]]; then
31+
echo "Also tag image for RELEASE build as latest"
32+
docker image tag ghcr.io/neuralmagic/nm-vllm-openai:${{ inputs.docker_tag }} ghcr.io/neuralmagic/nm-vllm-openai:latest || ((status+=$?))
33+
fi
34+
docker image ls -a
3035
echo "status=${status}" >> $GITHUB_OUTPUT
3136
echo "status=${status}"
3237
exit ${status}

.github/workflows/publish-docker.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
type: string
1717
default: 'main'
1818
build_type:
19-
description: "type of nm-vllm to install for the docker image: nightly (default) or release"
19+
description: "type of nm-vllm to install for the docker image: NIGHTLY (default) or RELEASE"
2020
type: string
21-
default: 'nightly'
21+
default: 'NIGHTLY'
2222
build_version:
2323
description: "version of nm-vllm to install for the docker image: latest (default) or specific version e.g. 0.4.0, 0.4.0.20240531"
2424
type: string
@@ -65,3 +65,12 @@ jobs:
6565
target: vllm-openai
6666
push: true
6767
tags: ghcr.io/neuralmagic/nm-vllm-openai:${{ inputs.docker_tag }}
68+
69+
- name: Push image (latest for RELEASE)
70+
uses: docker/build-push-action@v5
71+
if: ${{ inputs.push_to_repository == 'yes' && steps.build.outputs.status == 0 && inputs.build_type == 'RELEASE' }}
72+
with:
73+
context: .
74+
target: vllm-openai
75+
push: true
76+
tags: ghcr.io/neuralmagic/nm-vllm-openai:latest

0 commit comments

Comments
 (0)