Skip to content

Build latest images on manual event #14

Build latest images on manual event

Build latest images on manual event #14

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Build latest images on manual event
on:
workflow_dispatch:
inputs:
services:
default: "asr,dataprep"
description: "List of services to build including [asr,dataprep,embeddings,guardrails,llms,reranks,retrievers,tts,web_retrievers]"
required: true
type: string
tag:
default: "latest"
description: "Tag to apply to images"
required: true
type: string
nodes:
default: "docker-build-xeon,docker-build-gaudi"
description: "List of nodes to run the build including [docker-build-xeon,docker-build-gaudi]"
required: true
type: string
jobs:
get-build-matrix:
runs-on: ubuntu-latest
outputs:
services: ${{ steps.get-services.outputs.services }}
nodes: ${{ steps.get-services.outputs.nodes }}
steps:
- name: Get test Services
id: get-services
run: |
set -x
service_list=($(echo ${{ github.event.inputs.services }} | tr ',' ' '))
services=$(printf '%s\n' "${service_list[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "services=$services" >> $GITHUB_OUTPUT
node_list=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
nodes=$(printf '%s\n' "${node_list[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "nodes=$nodes" >> $GITHUB_OUTPUT
image-build:
needs: get-build-matrix
strategy:
matrix:
service: ${{ fromJSON(needs.get-build-matrix.outputs.services) }}
node: ${{ fromJSON(needs.get-build-matrix.outputs.nodes) }}
runs-on: ${{ matrix.node }}
continue-on-error: true
steps:
- name: Clean Up Working Directory
run: |
sudo rm -rf ${{github.workspace}}/*
- name: Checkout out Repo
uses: actions/checkout@v4
- name: Build image
env:
service: ${{ matrix.service }}
uses: opea-project/validation/actions/image-build@main
with:
work_dir: ${{ github.workspace }}
docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose.yaml
registry: ${OPEA_IMAGE_REPO}
tag: ${{ github.event.inputs.tag }}