Skip to content

feat(runtime): Pocket TTS cloning status fix, mount checks, and env simplification #272

feat(runtime): Pocket TTS cloning status fix, mount checks, and env simplification

feat(runtime): Pocket TTS cloning status fix, mount checks, and env simplification #272

Workflow file for this run

name: Container Images
on:
pull_request:
types: [opened, synchronize, reopened, labeled, ready_for_review]
paths:
- .github/workflows/image.yml
- .dockerignore
- Dockerfile
- compose.yml
- "src/**"
- requirements/**
- "scripts/**"
push:
tags: ["qwen3-tts-openvino-v*"]
workflow_dispatch:
inputs:
no-cache:
description: "Bypass build cache (use when cached manifests are missing from GHCR)"
type: boolean
default: false
env:
REGISTRY: ghcr.io
IMAGE_NAME: nmorgowicz-org/qwen3-tts-openvino
concurrency:
group: images-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: >-
github.event_name != 'pull_request' ||
(
github.event.pull_request.head.repo.full_name == github.repository &&
contains(github.event.pull_request.labels.*.name, 'ready-to-test') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test')
)
runs-on: arc-general-docker
timeout-minutes: 90
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Log in to Docker Hub
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
- name: Calculate image tags
id: tags
shell: bash
run: |
image="${REGISTRY}/${IMAGE_NAME}"
{
echo 'value<<EOF'
echo "${image}:${GITHUB_SHA}"
if [[ "${GITHUB_REF}" == refs/tags/qwen3-tts-openvino-v* ]]; then
release_tag="${GITHUB_REF_NAME#qwen3-tts-openvino-}"
echo "${image}:${release_tag}"
echo "${image}:latest"
fi
echo EOF
} >> "${GITHUB_OUTPUT}"
- name: Validate Compose example
env:
REF_AUDIO_PATH: ./voice/reference.wav
REF_TEXT: Example reference transcript for configuration validation
run: |
docker run --rm \
-e REF_AUDIO_PATH \
-e REF_TEXT \
-v "${PWD}:/work:ro" \
-w /work \
docker:29.6.1-cli@sha256:862099ada15c669000bef53aa4cb9d821262829f45b0dda2159ccb276443043b \
compose -f compose.yml config --quiet
- name: Build and optionally publish image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
tags: ${{ steps.tags.outputs.value }}
no-cache: ${{ inputs.no-cache == true }}
cache-from: ${{ inputs.no-cache != true && format('type=registry,ref={0}/{1}:buildcache', env.REGISTRY, env.IMAGE_NAME) || '' }}
cache-to: ${{ inputs.no-cache != true && format('type=registry,ref={0}/{1}:buildcache,mode=min,ignore-error=true', env.REGISTRY, env.IMAGE_NAME) || '' }}
provenance: ${{ github.event_name != 'pull_request' }}
sbom: ${{ github.event_name != 'pull_request' }}
- name: Pull published image for smoke test
if: github.event_name != 'pull_request'
run: docker pull "${REGISTRY}/${IMAGE_NAME}:${GITHUB_SHA}"
- name: Smoke-test image imports
shell: bash
run: |
image="${REGISTRY}/${IMAGE_NAME}:${GITHUB_SHA}"
docker run --rm --entrypoint python "${image}" -c \
'import benchmark_vocoder, export_openvino, nncf, openvino, ov_export_wrappers, parity_contract, qwen_tts, test_transformer_parity, test_vocoder_parity, torch; from qwen3_tts.model_config import resolve_model_repo; import scripts.download_model; assert resolve_model_repo({"MODEL_SIZE": "0.6B"}).endswith("0.6B-Base"); assert resolve_model_repo({"MODEL_SIZE": "1.7B"}).endswith("1.7B-Base"); print("image imports passed")'
cleanup:
if: >-
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/qwen3-tts-openvino-v')
needs: build
runs-on: arc-general
permissions:
packages: write
steps:
- name: Cleanup old container versions
uses: actions/delete-package-versions@v5
with:
min-versions-to-keep: 15
package-name: qwen3-tts-openvino
package-type: container
token: ${{ secrets.GITHUB_TOKEN }}
ignore-versions: |
latest
buildcache