File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (C) 2024 Intel Corporation
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
- name : Freeze base images and 3rd part images on manual event
4
+ name : Freeze base images and 3rd party images on manual event
5
5
6
6
on :
7
7
workflow_dispatch :
39
39
- name : Commit changes
40
40
run : |
41
41
git add .
42
- git commit -s -m "Freeze images tag"
42
+ git commit -s -m "Freeze third party images tag"
43
43
git push
Original file line number Diff line number Diff line change 36
36
- name : Run script
37
37
run : |
38
38
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'
39
41
40
42
- name : Commit changes
41
43
run : |
42
44
git add .
43
- git commit -s -m "Freeze images tag"
45
+ git commit -s -m "Freeze OPEA images tag"
44
46
git push
Original file line number Diff line number Diff line change 5
5
6
6
declare -A dict
7
7
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"
9
9
10
10
function get_latest_version() {
11
11
repo_image=$1
12
12
versions=$( skopeo list-tags ${dict[$repo_image]} | jq -r ' .Tags[]' )
13
13
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)
15
15
echo " latest version: $latest_version "
16
16
replace_image_version $repo_image $latest_version
17
17
}
@@ -23,7 +23,9 @@ function replace_image_version() {
23
23
echo " version is empty"
24
24
else
25
25
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"
27
29
fi
28
30
}
29
31
You can’t perform that action at this time.
0 commit comments