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 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
66on :
77 workflow_dispatch :
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 55
66declare -A dict
77dict[" 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
1010function 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
You can’t perform that action at this time.
0 commit comments