Skip to content

Commit

Permalink
Build and upstream latest base image on push event (#1355)
Browse files Browse the repository at this point in the history
Build and upstream latest base image on push event

#1314
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Mar 3, 2025
1 parent 644b5c6 commit a43d1de
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/docker/compose/base-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# this file should be run in the root of the repo
services:
comps-base:
build:
dockerfile: Dockerfile
image: ${REGISTRY:-opea}/comps-base:${TAG:-latest}
2 changes: 1 addition & 1 deletion .github/workflows/manual-comps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
inputs:
services:
default: "asr"
description: "List of services to test [agent,asr,chathistory,animation,dataprep,embeddings,feedback_management,finetuning,guardrails,image2image,image2video,intent_detection,llms,lvms,prompt_registry,ragas,rerankings,retrievers,text2image,text2sql,third_parties,tts,vectorstores,web_retrievers]"
description: "List of services to test [agent,animation,asr,chathistory,dataprep,embeddings,feedback_management,finetuning,guardrails,image2image,image2video,intent_detection,llms,lvms,prompt_registry,ragas,rerankings,retrievers,text2image,text2sql,third_parties,tts,vectorstores,web_retrievers]"
required: true
type: string
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
inputs:
services:
default: "asr"
description: "List of services to test [agent_langchain,asr,chathistory_mongo,dataprep_milvus...]" #,embeddings,guardrails,llms,lvms,prompt_registry,ragas,rerankings,retrievers,tts,web_retrievers]"
description: "List of services to test [agent,animation,asr,chathistory,dataprep,embeddings,feedback_management,finetuning,guardrails,image2image,image2video,intent_detection,llms,lvms,prompt_registry,ragas,rerankings,retrievers,text2image,text2sql,third_parties,tts,vectorstores,web_retrievers]"
required: false
type: string
images:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/push-base-image-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Build and upstream latest base image on push event

on:
push:
branches: ["main"]
paths:
- 'cores/**'
- '**/src/**'
- 'requirements.txt'
- 'Dockerfile'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-on-push
cancel-in-progress: true

jobs:
image-build:
strategy:
matrix:
node: [xeon, gaudi]
runs-on: docker-build-${{ matrix.node }}
continue-on-error: true
steps:
- name: Clean up Working Directory
run: |
echo "Build opea/comps-base:latest !"
sudo rm -rf ${{github.workspace}}/*
- name: Checkout out Repo
uses: actions/checkout@v4

- name: Build Image
uses: opea-project/validation/actions/image-build@main
with:
work_dir: ${{ github.workspace }}
docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/base-compose.yaml
registry: ${OPEA_IMAGE_REPO}opea

image-publish:
needs: [ image-build ]
runs-on: "docker-build-gaudi"
steps:
- uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Image Publish
uses: opea-project/validation/actions/image-publish@main
with:
local_image_ref: ${OPEA_IMAGE_REPO}opea/comps-base:latest
image_name: opea/comps-base
publish_tags: latest

0 comments on commit a43d1de

Please sign in to comment.