Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue committed Jul 11, 2024
1 parent 9f7d1bb commit 3a5630b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/reuse-get-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ jobs:
run_matrix="{\"include\":["
for service in ${services}; do
hardware="gaudi" # default hardware, set based on the changed files
if [[ ls comps/${service} | grep -E "Dockerfile*|docker*" ]]; then
if [[ $(ls comps/${service} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}\",\"hardware\":\"${hardware}\"},"
fi
vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | cut -d'/' -f3 | grep -vE '*.py|Dockerfile|*.sh|docker|*.yaml|*.yml' | sort -u)
for vendor in ${vendors}; do
if [[ ls comps/${service}/${vendor} | grep -E "Dockerfile*|docker*" ]]; then
if [[ $(ls comps/${service}/${vendor} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}\",\"hardware\":\"${hardware}\"},"
fi
sub_vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | grep ${vendor} | cut -d'/' -f4 | grep -vE '*.py|Dockerfile|*.sh|docker|*.yaml|*.yml' | sort -u)
for sub_vendor in ${sub_vendors}; do
if [[ ls comps/${service}/${vendor}/${sub_vendor} | grep -E "Dockerfile*|docker*" ]]; then
if [[ $(ls comps/${service}/${vendor}/${sub_vendor} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}/${sub_vendor}\",\"hardware\":\"${hardware}\"},"
fi
done
Expand Down

0 comments on commit 3a5630b

Please sign in to comment.