Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/_get-image-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Set Matrix
id: get-matrix
run: |
set -x
image_list=[]
if [[ ! -z "${{ inputs.services }}" ]]; then
pip install yq
Expand All @@ -44,7 +45,11 @@ jobs:
docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose.yaml
if [ -f "$docker_compose_yml" ]; then
build_list=$(bash ${{ github.workspace }}/.github/workflows/scripts/get_cicd_list.sh "${{ inputs.mode }}" $docker_compose_yml)
image_list=$(echo $build_list| jq -R 'split(",")' | jq -s 'add')
if [ -n "$build_list" ]; then
images=($(echo ${build_list} | tr ',' ' '))
input_image_list=$(printf '%s\n' "${images[@]}" | sort -u | jq -R '.' | jq -sc '.')
image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${input_image_list}))
fi
fi
done
fi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/scripts/get_cicd_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

WORKPATH=$PWD
# echo "mode is: "$1 "compose file is: "$2
git clone https://github.com/opea-project/GenAIExamples.git
if [ ! -d GenAIExamples ]; then
git clone https://github.com/opea-project/GenAIExamples.git
fi
all_ci_yaml=$(find GenAIExamples -name "build.yaml")
all_ci_lists=$(grep '^[[:space:]]\{2\}[a-zA-Z0-9_-]\+:' $all_ci_yaml | awk -F: '{print$2}' | sed 's/^[[:space:]]\+//' | tr '\n' ',' | sed 's/,$//')

Expand Down
Loading