Skip to content

Commit 2447548

Browse files
XuehaoSundmsuehir
authored andcommitted
fix ghcr.io/huggingface/text-generation-inference tag (opea-project#622)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com> Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent e6f7eb1 commit 2447548

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/manual-freeze-images.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) 2024 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
name: Freeze base images and 3rd part images on manual event
4+
name: Freeze base images and 3rd party images on manual event
55

66
on:
77
workflow_dispatch:
@@ -39,5 +39,5 @@ jobs:
3939
- name: Commit changes
4040
run: |
4141
git add .
42-
git commit -s -m "Freeze images tag"
42+
git commit -s -m "Freeze third party images tag"
4343
git push

.github/workflows/manual-freeze-tag.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ jobs:
3636
- name: Run script
3737
run: |
3838
find . -name "*.md" | xargs sed -i "s|^docker\ compose|TAG=${{ github.event.inputs.tag }}\ docker\ compose|g"
39+
find . -type f -name "*.yaml" \( -path "*/benchmark/*" -o -path "*/kubernetes/*" \) | xargs sed -i -E 's/(opea\/[A-Za-z0-9\-]*:)latest/\1${{ github.event.inputs.tag }}/g'
40+
find . -type f -name "*.md" \( -path "*/benchmark/*" -o -path "*/kubernetes/*" \) | xargs sed -i -E 's/(opea\/[A-Za-z0-9\-]*:)latest/\1${{ github.event.inputs.tag }}/g'
3941
4042
- name: Commit changes
4143
run: |
4244
git add .
43-
git commit -s -m "Freeze images tag"
45+
git commit -s -m "Freeze OPEA images tag"
4446
git push

.github/workflows/scripts/freeze_images.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
declare -A dict
77
dict["langchain/langchain"]="docker://docker.io/langchain/langchain"
8-
# dict["ghcr.io/huggingface/text-generation-inference"]="docker://ghcr.io/huggingface/text-generation-inference"
8+
dict["ghcr.io/huggingface/text-generation-inference"]="docker://ghcr.io/huggingface/text-generation-inference"
99

1010
function get_latest_version() {
1111
repo_image=$1
1212
versions=$(skopeo list-tags ${dict[$repo_image]} | jq -r '.Tags[]')
1313
printf "version list:\n$versions\n"
14-
latest_version=$(printf "%s\n" "${versions[@]}" | grep -E '^[\.rc0-9\-]+$' | sort -V | tail -n 1)
14+
latest_version=$(printf "%s\n" "${versions[@]}" | grep -E '^[\.0-9\-]+$' | sort -V | tail -n 1)
1515
echo "latest version: $latest_version"
1616
replace_image_version $repo_image $latest_version
1717
}
@@ -23,7 +23,9 @@ function replace_image_version() {
2323
echo "version is empty"
2424
else
2525
echo "replace $repo_image:latest with $repo_image:$version"
26-
find . -name "Dockerfile" | xargs sed -i "s|$repo_image:latest|$repo_image:$version|g"
26+
find . -name "Dockerfile" | xargs sed -i "s|$repo_image:latest.*|$repo_image:$version|g"
27+
find . -name "*.yaml" | xargs sed -i "s|$repo_image:latest[A-Za-z0-9\-]*|$repo_image:$version|g"
28+
find . -name "*.md" | xargs sed -i "s|$repo_image:latest[A-Za-z0-9\-]*|$repo_image:$version|g"
2729
fi
2830
}
2931

0 commit comments

Comments
 (0)