Skip to content

Commit bfefdfa

Browse files
authored
Fix vllm version update workflow (#1919)
Signed-off-by: Sun, Xuehao <[email protected]>
1 parent b467a13 commit bfefdfa

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

.github/env/_build_image.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
export VLLM_VER=v0.8.3
5+
export VLLM_FORK_VER=v0.6.6.post1+Gaudi-1.20.0

.github/workflows/_build_image.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,12 @@ jobs:
7575
run: |
7676
cd ${{ github.workspace }}/${{ inputs.example }}/docker_image_build
7777
docker_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml
78+
source ${{ github.workspace }}/.github/env/_build_image.sh
7879
if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
79-
git clone https://github.com/vllm-project/vllm.git && cd vllm
80-
VLLM_VER=v0.8.3
81-
echo "Check out vLLM tag ${VLLM_VER}"
82-
git checkout ${VLLM_VER} &> /dev/null && cd ../
80+
git clone -b ${VLLM_VER} --single-branch https://github.com/vllm-project/vllm.git
8381
fi
8482
if [[ $(grep -c "vllm-gaudi:" ${docker_compose_path}) != 0 ]]; then
85-
git clone https://github.com/HabanaAI/vllm-fork.git && cd vllm-fork
86-
VLLM_FORK_VER=v0.6.6.post1+Gaudi-1.20.0
87-
echo "Check out vLLM tag ${VLLM_FORK_VER}"
88-
git checkout ${VLLM_FORK_VER} &> /dev/null && cd ../
83+
git clone -b ${VLLM_FORK_VER} --single-branch https://github.com/HabanaAI/vllm-fork.git
8984
fi
9085
git clone --depth 1 --branch ${{ inputs.opea_branch }} https://github.com/opea-project/GenAIComps.git
9186
cd GenAIComps && git rev-parse HEAD && cd ../

.github/workflows/daily-update-vllm-version.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
repo_name: vllm-project/vllm
2424
ver_name: VLLM_VER
2525
- repo: vLLM-fork
26-
repo_url: HabanaAI/vllm-fork
26+
repo_name: HabanaAI/vllm-fork
2727
ver_name: VLLM_FORK_VER
2828
permissions:
2929
contents: write
@@ -55,8 +55,9 @@ jobs:
5555
- name: Run script
5656
run: |
5757
latest_vllm_ver=$(curl -s "https://api.github.com/repos/${{ matrix.repo_name }}/tags" | jq '.[0].name' -)
58+
latest_vllm_ver=$(echo "$latest_vllm_ver" | sed 's/"//g')
5859
echo "latest_vllm_ver=${latest_vllm_ver}" >> "$GITHUB_ENV"
59-
find . -type f \( -name "*.sh" -o -name "_build_image.yml" \) -exec sed -i "s/${{ matrix.ver_name }}=.*/${{ matrix.ver_name }}=${latest_vllm_ver}/" {} \;
60+
find . -type f -name "*.sh" -exec sed -i "s/${{ matrix.ver_name }}=.*/${{ matrix.ver_name }}=${latest_vllm_ver}/" {} \;
6061
6162
- name: Commit changes
6263
run: |
@@ -66,28 +67,27 @@ jobs:
6667
exit 1
6768
else
6869
git commit -s -m "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
69-
git push
70+
git push --set-upstream origin ${{ env.BRANCH_NAME }}_${{ matrix.repo }}
7071
fi
7172
7273
- name: Create Pull Request
74+
env:
75+
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}
7376
run: |
7477
pr_count=$(curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls?state=all&head=${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}" | jq '. | length')
7578
if [ $pr_count -gt 0 ]; then
7679
echo "Pull Request exists"
7780
pr_number=$(curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls?state=all&head=${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}" | jq '.[0].number')
78-
curl -X PATCH -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -d "{
79-
\"title\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
80-
\"body\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
81-
\"state\":\"open\"
82-
}" "https://api.github.com/repos/${{ github.repository }}/pulls/${pr_number}"
81+
gh pr edit ${pr_number} \
82+
--title "Update ${{ matrix.repo }} version to ${latest_vllm_ver}" \
83+
--body "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
8384
echo "Pull Request updated successfully"
8485
else
85-
echo "Pull Request not exists..."
86-
curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -d "{
87-
\"title\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
88-
\"body\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
89-
\"head\":\"${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}\",
90-
\"base\":\"main\"
91-
}" "https://api.github.com/repos/${{ github.repository }}/pulls"
86+
echo "Pull Request does not exists..."
87+
gh pr create \
88+
-B main \
89+
-H ${{ env.BRANCH_NAME }}_${{ matrix.repo }} \
90+
--title "Update ${{ matrix.repo }} version to ${latest_vllm_ver}" \
91+
--body "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
9292
echo "Pull Request created successfully"
9393
fi

0 commit comments

Comments
 (0)