-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and upstream latest base image on push event (#1355)
Build and upstream latest base image on push event #1314 Signed-off-by: chensuyue <[email protected]>
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |