File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3939 BRANCH_NAME=${{ github.ref_name }}
4040 SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's#[^a-zA-Z0-9._-]#-#g')
4141
42- # Query docker images and find the latest chatapi and chatui images
43- CHATAPI_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep -i " chatapi" | grep -v "none" | head -n 1)
44- CHATUI_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep -i " chatui" | grep -v "none" | head -n 1)
42+ # Query docker images and find the latest chatapi and chatui images (most recently built)
43+ CHATAPI_IMAGE=$(docker images --format "{{.CreatedAt}}\t{{. Repository}}:{{.Tag}}" | grep -E $'^\t[^/]* chatapi:' | sort -r | head -n 1 | awk '{print $NF}' )
44+ CHATUI_IMAGE=$(docker images --format "{{.CreatedAt}}\t{{. Repository}}:{{.Tag}}" | grep -E $'^\t[^/]* chatui:' | sort -r | head -n 1 | awk '{print $NF}' )
4545
4646 # Tag and push chatapi if found
4747 if [ -n "$CHATAPI_IMAGE" ]; then
You can’t perform that action at this time.
0 commit comments