[infra] Add Dreamverse Modal UI image build (#1381)
This commit is contained in:
@@ -16,6 +16,14 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: fastvideo-dev
|
||||
build_args:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
include_latest_tags:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -71,11 +79,14 @@ jobs:
|
||||
run: |
|
||||
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
|
||||
|
||||
TAGS="type=raw,value=${{ inputs.tag_suffix }}-latest"
|
||||
TAGS="${TAGS}\ntype=raw,value=${{ inputs.tag_suffix }}-sha-${SHORT_SHA}"
|
||||
|
||||
TAGS="type=raw,value=${{ inputs.tag_suffix }}-sha-${SHORT_SHA}"
|
||||
|
||||
if [[ "${{ inputs.include_latest_tags }}" == "true" ]]; then
|
||||
TAGS="type=raw,value=${{ inputs.tag_suffix }}-latest\n${TAGS}"
|
||||
fi
|
||||
|
||||
# Set Python 3.10 as the default image
|
||||
if [[ "${{ inputs.python_version }}" == "3.10" ]]; then
|
||||
if [[ "${{ inputs.include_latest_tags }}" == "true" && "${{ inputs.python_version }}" == "3.10" ]]; then
|
||||
TAGS="${TAGS}\ntype=raw,value=latest"
|
||||
fi
|
||||
|
||||
@@ -101,10 +112,11 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: ${{ inputs.build_args }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: Success message
|
||||
run: |
|
||||
echo "✅ Python ${{ inputs.python_version }} image successfully built and pushed to ghcr.io/${{ github.repository }}/${{ inputs.image_name }}:${{ inputs.tag_suffix }}-latest"
|
||||
echo "✅ Python ${{ inputs.python_version }} image successfully built and pushed to ghcr.io/${{ github.repository }}/${{ inputs.image_name }}:${{ inputs.tag_suffix }}-sha-${GITHUB_SHA::7}"
|
||||
echo "To run tests with this image, manually trigger the 'Run Tests' workflow."
|
||||
|
||||
@@ -24,7 +24,7 @@ on:
|
||||
default: false
|
||||
type: boolean
|
||||
dreamverse_cuda_12_9:
|
||||
description: 'Build Dreamverse CUDA 12.9 image'
|
||||
description: 'Build Dreamverse CUDA 12.9 backend-only and UI images'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
@@ -71,12 +71,26 @@ jobs:
|
||||
tag_suffix: py3.12-cuda12.9.1
|
||||
secrets: inherit
|
||||
|
||||
build-dreamverse-cuda-12-9:
|
||||
build-dreamverse-backend-cuda-12-9:
|
||||
if: ${{ github.event.inputs.dreamverse_cuda_12_9 == 'true' }}
|
||||
uses: ./.github/workflows/_template-build-image.yml
|
||||
with:
|
||||
python_version: '3.12'
|
||||
dockerfile_path: apps/dreamverse/docker/Dockerfile
|
||||
tag_suffix: dreamverse-cuda12.9.1
|
||||
tag_suffix: dreamverse-backend-cuda12.9.1
|
||||
image_name: dreamverse
|
||||
build_args: BUILD_DREAMVERSE_UI=0
|
||||
include_latest_tags: false
|
||||
secrets: inherit
|
||||
|
||||
build-dreamverse-ui-cuda-12-9:
|
||||
if: ${{ github.event.inputs.dreamverse_cuda_12_9 == 'true' }}
|
||||
uses: ./.github/workflows/_template-build-image.yml
|
||||
with:
|
||||
python_version: '3.12'
|
||||
dockerfile_path: apps/dreamverse/docker/Dockerfile
|
||||
tag_suffix: dreamverse-ui-cuda12.9.1
|
||||
image_name: dreamverse
|
||||
build_args: BUILD_DREAMVERSE_UI=1
|
||||
include_latest_tags: false
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user