Release (auto patch bump) #68
This file contains hidden or 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
| name: Release | |
| run-name: >- | |
| Release | |
| ${{ inputs.releaseTag != '' && inputs.releaseTag || format('(auto {0} bump)', inputs.bumpType || 'patch') }} | |
| ${{ inputs.pushLatest && ' + latest' || '' }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bumpType: | |
| description: "Version bump type (ignored when releaseTag is provided)" | |
| required: false | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| default: "patch" | |
| releaseTag: | |
| description: "Explicit release tag — overrides auto-bump (e.g., v1.2.3)" | |
| required: false | |
| type: string | |
| pushLatest: | |
| description: "Tag images produced by this job as latest" | |
| required: false | |
| type: boolean | |
| default: false | |
| llamaServerVersion: | |
| description: "llama-server version" | |
| required: false | |
| type: string | |
| default: "latest" | |
| vllmVersion: | |
| description: "vLLM version" | |
| required: false | |
| type: string | |
| default: "0.12.0" | |
| sglangVersion: | |
| description: "SGLang version" | |
| required: false | |
| type: string | |
| default: "0.4.0" | |
| # This can be removed once we have llama.cpp built for MUSA and CANN. | |
| buildMusaCann: | |
| description: "Build MUSA and CANN images" | |
| required: false | |
| type: boolean | |
| default: false | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Determine or create the release tag. | |
| # Auto-bumps the latest tag (or uses explicit releaseTag if provided). | |
| # --------------------------------------------------------------------------- | |
| prepare: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| release_tag: ${{ steps.resolve.outputs.release_tag }} | |
| version: ${{ steps.resolve.outputs.version }} | |
| previous_tag: ${{ steps.resolve.outputs.previous_tag }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| - name: Resolve release tag | |
| id: resolve | |
| env: | |
| EXPLICIT_TAG: ${{ inputs.releaseTag }} | |
| BUMP_TYPE: ${{ inputs.bumpType || 'patch' }} | |
| run: | | |
| # --- Find the latest existing v* tag --- | |
| LATEST_TAG=$(git tag --list 'v*' --sort=-v:refname | head -1) | |
| echo "Latest existing tag: ${LATEST_TAG:-<none>}" | |
| if [ -n "$EXPLICIT_TAG" ]; then | |
| # Validate explicit tag format | |
| if ! echo "$EXPLICIT_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then | |
| echo "::error::Invalid release tag format: '$EXPLICIT_TAG'. Expected format: v<MAJOR>.<MINOR>.<PATCH> (e.g., v1.2.3)" | |
| exit 1 | |
| fi | |
| # Explicit tag provided — use it directly | |
| RELEASE_TAG="$EXPLICIT_TAG" | |
| VERSION="${EXPLICIT_TAG#v}" | |
| PREVIOUS_TAG="$LATEST_TAG" | |
| echo "Explicit tag provided: $RELEASE_TAG" | |
| else | |
| # Auto-bump from latest tag | |
| if [ -z "$LATEST_TAG" ]; then | |
| echo "No existing tags found — starting at v0.1.0" | |
| RELEASE_TAG="v0.1.0" | |
| VERSION="0.1.0" | |
| PREVIOUS_TAG="" | |
| else | |
| PREVIOUS_TAG="$LATEST_TAG" | |
| # Strip leading 'v' for parsing | |
| VERSION="${LATEST_TAG#v}" | |
| MAJOR=$(echo "$VERSION" | cut -d. -f1) | |
| MINOR=$(echo "$VERSION" | cut -d. -f2) | |
| PATCH=$(echo "$VERSION" | cut -d. -f3) | |
| case "$BUMP_TYPE" in | |
| major) | |
| MAJOR=$((MAJOR + 1)) | |
| MINOR=0 | |
| PATCH=0 | |
| ;; | |
| minor) | |
| MINOR=$((MINOR + 1)) | |
| PATCH=0 | |
| ;; | |
| patch) | |
| PATCH=$((PATCH + 1)) | |
| ;; | |
| esac | |
| VERSION="${MAJOR}.${MINOR}.${PATCH}" | |
| RELEASE_TAG="v${VERSION}" | |
| echo "Auto-bumped $BUMP_TYPE: $LATEST_TAG → $RELEASE_TAG" | |
| fi | |
| fi | |
| echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "previous_tag=${PREVIOUS_TAG:-}" >> "$GITHUB_OUTPUT" | |
| echo "🏷️ Release tag: $RELEASE_TAG" | |
| echo "🏷️ Version: $VERSION" | |
| echo "🏷️ Previous tag: ${PREVIOUS_TAG:-<none>}" | |
| - name: Create and push tag | |
| env: | |
| RELEASE_TAG: ${{ steps.resolve.outputs.release_tag }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Check if the tag already exists | |
| if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1; then | |
| echo "⚠️ Tag $RELEASE_TAG already exists — skipping creation" | |
| exit 0 | |
| fi | |
| echo "Creating tag $RELEASE_TAG on $(git rev-parse --short HEAD)" | |
| git tag "$RELEASE_TAG" | |
| git push origin "$RELEASE_TAG" | |
| echo "✅ Tag $RELEASE_TAG created and pushed" | |
| # --------------------------------------------------------------------------- | |
| # Generate release notes using cagent AI agent (runs in parallel with test) | |
| # --------------------------------------------------------------------------- | |
| release-notes: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate release notes | |
| uses: docker/cagent-action@d53201d5c0adae9b27bb615beb0a6e45757806ee | |
| with: | |
| agent: .github/agents/release-notes-generator.yaml | |
| anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| prompt: | | |
| **Release Tag:** ${{ needs.prepare.outputs.release_tag }} | |
| **Previous Tag:** ${{ needs.prepare.outputs.previous_tag }} | |
| **Repository:** docker/model-runner | |
| - name: Verify release notes | |
| env: | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| PREVIOUS_TAG: ${{ needs.prepare.outputs.previous_tag }} | |
| run: | | |
| if [ ! -f "release-notes.md" ]; then | |
| echo "::warning::Release notes were not generated. Using fallback." | |
| echo "## What's Changed" > release-notes.md | |
| echo "" >> release-notes.md | |
| if [ -n "$PREVIOUS_TAG" ]; then | |
| echo "**Full Changelog**: https://github.com/docker/model-runner/compare/${PREVIOUS_TAG}...${RELEASE_TAG}" >> release-notes.md | |
| else | |
| echo "**Full Changelog**: https://github.com/docker/model-runner/tree/${RELEASE_TAG}" >> release-notes.md | |
| fi | |
| fi | |
| echo "✅ Release notes:" | |
| cat release-notes.md | |
| - name: Upload release notes | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f | |
| with: | |
| name: release-notes | |
| path: release-notes.md | |
| # --------------------------------------------------------------------------- | |
| # Run tests | |
| # --------------------------------------------------------------------------- | |
| test: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 | |
| with: | |
| go-version: 1.25.6 | |
| cache: true | |
| - name: Run tests | |
| run: go test -race ./... | |
| # --------------------------------------------------------------------------- | |
| # Build and push Docker images | |
| # --------------------------------------------------------------------------- | |
| build: | |
| needs: [prepare, test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| env: | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| LLAMA_SERVER_VERSION: ${{ inputs.llamaServerVersion || 'latest' }} | |
| VLLM_VERSION: ${{ inputs.vllmVersion || '0.12.0' }} | |
| SGLANG_VERSION: ${{ inputs.sglangVersion || '0.4.0' }} | |
| PUSH_LATEST: ${{ inputs.pushLatest || 'false' }} | |
| BUILD_MUSA_CANN: ${{ inputs.buildMusaCann || 'false' }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Format tags | |
| id: tags | |
| shell: bash | |
| run: | | |
| echo "cpu<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "cuda<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-cuda" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-cuda" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "vllm-cuda<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-vllm-cuda" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-vllm-cuda" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "sglang-cuda<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-sglang-cuda" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-sglang-cuda" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "diffusers<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-diffusers" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-diffusers" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "rocm<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-rocm" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-rocm" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "musa<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-musa" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-musa" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| echo "cann<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "docker/model-runner:$RELEASE_TAG-cann" >> "$GITHUB_OUTPUT" | |
| if [ "$PUSH_LATEST" == "true" ]; then | |
| echo "docker/model-runner:latest-cann" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo 'EOF' >> "$GITHUB_OUTPUT" | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 | |
| with: | |
| username: "docker" | |
| password: ${{ secrets.ORG_ACCESS_TOKEN }} | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 | |
| with: | |
| version: "lab:latest" | |
| driver: cloud | |
| endpoint: "docker/make-product-smarter" | |
| install: true | |
| - name: Build CPU image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-llamacpp | |
| platforms: linux/amd64, linux/arm64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.cpu }} | |
| - name: Build CUDA image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-llamacpp | |
| platforms: linux/amd64, linux/arm64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=cuda" | |
| "BASE_IMAGE=nvidia/cuda:12.9.0-runtime-ubuntu24.04" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.cuda }} | |
| - name: Build vLLM CUDA image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-vllm | |
| platforms: linux/amd64, linux/arm64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=cuda" | |
| "BASE_IMAGE=nvidia/cuda:13.0.2-runtime-ubuntu24.04" | |
| "VLLM_VERSION=${{ env.VLLM_VERSION }}" | |
| "VLLM_CUDA_VERSION=cu130" | |
| "VLLM_PYTHON_TAG=cp38-abi3" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.vllm-cuda }} | |
| - name: Build SGLang CUDA image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-sglang | |
| platforms: linux/amd64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=cuda" | |
| "BASE_IMAGE=nvidia/cuda:12.9.0-runtime-ubuntu24.04" | |
| "SGLANG_VERSION=${{ env.SGLANG_VERSION }}" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.sglang-cuda }} | |
| - name: Build Diffusers image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-diffusers | |
| platforms: linux/amd64, linux/arm64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.diffusers }} | |
| - name: Build ROCm image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-llamacpp | |
| platforms: linux/amd64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=rocm" | |
| "BASE_IMAGE=rocm/dev-ubuntu-22.04" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.rocm }} | |
| - name: Build MUSA image | |
| if: ${{ env.BUILD_MUSA_CANN == 'true' }} | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-llamacpp | |
| platforms: linux/amd64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=musa" | |
| "BASE_IMAGE=mthreads/musa:rc4.3.0-runtime-ubuntu22.04-amd64" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.musa }} | |
| - name: Build CANN image | |
| if: ${{ env.BUILD_MUSA_CANN == 'true' }} | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 | |
| with: | |
| file: Dockerfile | |
| target: final-llamacpp | |
| platforms: linux/arm64, linux/amd64 | |
| build-args: | | |
| "LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}" | |
| "LLAMA_SERVER_VARIANT=cann" | |
| "BASE_IMAGE=ascendai/cann:8.2.rc2-910b-ubuntu22.04-py3.11" | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: ${{ steps.tags.outputs.cann }} | |
| # --------------------------------------------------------------------------- | |
| # Release CLI for Docker Desktop — build, sign & push CLI + Desktop module image | |
| # (triggers docker/inference-engine-llama.cpp: signs macOS/Windows binaries, | |
| # pushes docker/docker-model-cli-desktop-module to Docker Hub) | |
| # --------------------------------------------------------------------------- | |
| release-cli-desktop: | |
| needs: [prepare, test] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Trigger release-cli-dd workflow | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| run: | | |
| echo "🚀 Triggering release-cli-dd workflow" | |
| echo " model-cli-ref: $RELEASE_TAG" | |
| echo " tag: v$VERSION" | |
| gh workflow run release-cli-dd.yml \ | |
| --repo docker/inference-engine-llama.cpp \ | |
| -f model-cli-ref="$RELEASE_TAG" \ | |
| -f tag="v$VERSION" | |
| echo "✅ release-cli-dd workflow triggered" | |
| - name: Wait for release-cli-dd to complete | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| run: | | |
| echo "⏳ Waiting for release-cli-dd workflow to appear..." | |
| sleep 15 | |
| # Find the most recent run of release-cli-dd.yml in inference-engine-llama.cpp | |
| for i in $(seq 1 10); do | |
| RUN_ID=$(gh run list \ | |
| --repo docker/inference-engine-llama.cpp \ | |
| --workflow release-cli-dd.yml \ | |
| --limit 1 \ | |
| --json databaseId \ | |
| --jq '.[0].databaseId') | |
| if [ -n "$RUN_ID" ]; then | |
| echo "Found release-cli-dd run: $RUN_ID" | |
| break | |
| fi | |
| echo " Retry $i/10..." | |
| sleep 10 | |
| done | |
| if [ -z "$RUN_ID" ]; then | |
| echo "::error::Could not find release-cli-dd workflow run" | |
| exit 1 | |
| fi | |
| echo "⏳ Waiting for release-cli-dd run $RUN_ID to complete..." | |
| gh run watch "$RUN_ID" \ | |
| --repo docker/inference-engine-llama.cpp \ | |
| --exit-status | |
| echo "✅ release-cli-dd workflow completed successfully" | |
| # --------------------------------------------------------------------------- | |
| # Bump docker-model version in pinata and open a PR | |
| # --------------------------------------------------------------------------- | |
| bump-pinata: | |
| needs: [prepare, release-cli-desktop] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout pinata | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| repository: docker/pinata | |
| token: ${{ secrets.CLI_RELEASE_PAT }} | |
| fetch-depth: 0 | |
| - name: Bump docker-model version in build.json | |
| env: | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| run: | | |
| NEW_VERSION="v${VERSION}" | |
| jq --arg v "$NEW_VERSION" '.["docker-model"].version = $v' build.json > build.json.tmp | |
| mv build.json.tmp build.json | |
| - name: Create pull request | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 | |
| with: | |
| token: ${{ secrets.CLI_RELEASE_PAT }} | |
| base: main | |
| commit-message: "chore: bump docker-model to v${{ needs.prepare.outputs.version }}" | |
| branch: bump-docker-model-v${{ needs.prepare.outputs.version }} | |
| title: "Bump docker-model to v${{ needs.prepare.outputs.version }}" | |
| body: | | |
| ### Ticket(s) | |
| N/A — automated version bump | |
| ### What this PR does | |
| Bumps docker-model version to v${{ needs.prepare.outputs.version }} in build.json. | |
| ### Notes for the reviewer | |
| Automated PR created by the model-runner release workflow. | |
| draft: true | |
| # --------------------------------------------------------------------------- | |
| # Release CLI for Docker CE — build .deb/.rpm packages and deploy to download.docker.com | |
| # (triggers docker/packaging → docker/release-repo) | |
| # --------------------------------------------------------------------------- | |
| release-cli-docker-ce: | |
| if: ${{ !inputs.skipPackaging }} | |
| needs: [prepare, release-cli-desktop] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Trigger release-model workflow in packaging repo | |
| id: trigger | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| run: | | |
| echo "📦 Triggering release-model workflow in docker/packaging" | |
| echo " ref: $RELEASE_TAG" | |
| gh workflow run release-model.yml \ | |
| --repo docker/packaging \ | |
| -f ref="$RELEASE_TAG" | |
| echo "✅ release-model workflow triggered in docker/packaging" | |
| - name: Wait for packaging workflow to complete | |
| id: packaging | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| run: | | |
| echo "⏳ Waiting for packaging workflow to appear..." | |
| sleep 15 | |
| # Find the most recent run of release-model.yml | |
| for i in $(seq 1 10); do | |
| RUN_ID=$(gh run list \ | |
| --repo docker/packaging \ | |
| --workflow release-model.yml \ | |
| --limit 1 \ | |
| --json databaseId,createdAt \ | |
| --jq '.[0].databaseId') | |
| if [ -n "$RUN_ID" ]; then | |
| echo "Found packaging run: $RUN_ID" | |
| break | |
| fi | |
| echo " Retry $i/10..." | |
| sleep 10 | |
| done | |
| if [ -z "$RUN_ID" ]; then | |
| echo "::error::Could not find packaging workflow run" | |
| exit 1 | |
| fi | |
| echo "⏳ Waiting for packaging run $RUN_ID to complete..." | |
| gh run watch "$RUN_ID" \ | |
| --repo docker/packaging \ | |
| --exit-status | |
| # Get the run number to construct the image tag | |
| RUN_NUMBER=$(gh run view "$RUN_ID" \ | |
| --repo docker/packaging \ | |
| --json number \ | |
| --jq '.number') | |
| PACKAGING_IMAGE="dockereng/packaging:model-v${VERSION}-${RUN_NUMBER}" | |
| echo "📦 Packaging image: $PACKAGING_IMAGE" | |
| echo "packaging_image=$PACKAGING_IMAGE" >> "$GITHUB_OUTPUT" | |
| echo "✅ Packaging workflow completed successfully" | |
| - name: Trigger release-repo plugin workflow | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| PACKAGING_IMAGE: ${{ steps.packaging.outputs.packaging_image }} | |
| run: | | |
| echo "🚀 Triggering plugin release in docker/release-repo" | |
| echo " packaging_image: $PACKAGING_IMAGE" | |
| echo " model_version: $VERSION" | |
| echo " channel: stable" | |
| echo " release_live: true" | |
| gh workflow run plugin.yml \ | |
| --repo docker/release-repo \ | |
| --ref production \ | |
| -f packaging_image="$PACKAGING_IMAGE" \ | |
| -f model_version="$VERSION" \ | |
| -f channel=stable \ | |
| -f release_live=true | |
| echo "✅ Plugin release workflow triggered in docker/release-repo" | |
| - name: Wait for release-repo plugin workflow to complete | |
| env: | |
| GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} | |
| run: | | |
| echo "⏳ Waiting for release-repo plugin workflow to appear..." | |
| sleep 15 | |
| # Find the most recent run of plugin.yml in release-repo | |
| for i in $(seq 1 10); do | |
| RUN_ID=$(gh run list \ | |
| --repo docker/release-repo \ | |
| --workflow plugin.yml \ | |
| --limit 1 \ | |
| --json databaseId \ | |
| --jq '.[0].databaseId') | |
| if [ -n "$RUN_ID" ]; then | |
| echo "Found release-repo run: $RUN_ID" | |
| break | |
| fi | |
| echo " Retry $i/10..." | |
| sleep 10 | |
| done | |
| if [ -z "$RUN_ID" ]; then | |
| echo "::error::Could not find release-repo plugin workflow run" | |
| exit 1 | |
| fi | |
| echo "⏳ Waiting for release-repo run $RUN_ID to complete (includes manual deploy-to-live approval)..." | |
| gh run watch "$RUN_ID" \ | |
| --repo docker/release-repo \ | |
| --exit-status | |
| echo "✅ Release-repo plugin workflow completed successfully" | |
| - name: Post summary | |
| env: | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| PACKAGING_IMAGE: ${{ steps.packaging.outputs.packaging_image }} | |
| run: | | |
| cat >> "$GITHUB_STEP_SUMMARY" <<-SUMMARY | |
| ## 📦 Docker CE Packaging & Release | |
| | Step | Status | | |
| |------|--------| | |
| | Packaging image | \`${PACKAGING_IMAGE}\` | | |
| | Model version | \`${VERSION}\` | | |
| | Release channel | \`stable\` | | |
| | Deploy to live | ✅ Yes | | |
| | Release tag | \`${RELEASE_TAG}\` | | |
| The plugin release workflow has been triggered in [docker/release-repo](https://github.com/docker/release-repo/actions/workflows/plugin.yml). | |
| SUMMARY | |
| # --------------------------------------------------------------------------- | |
| # Verify Docker CE installation — run test-docker-ce-installation.sh | |
| # to confirm the CLI version is available via get.docker.com | |
| # --------------------------------------------------------------------------- | |
| verify-docker-ce: | |
| needs: [prepare, release-cli-docker-ce, build] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| base_image: | |
| - ubuntu:24.04 | |
| - debian:12 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Verify Docker CE installation | |
| env: | |
| BASE_IMAGE: ${{ matrix.base_image }} | |
| run: | | |
| chmod +x scripts/test-docker-ce-installation.sh | |
| ./scripts/test-docker-ce-installation.sh "${{ needs.prepare.outputs.release_tag }}" | |
| # --------------------------------------------------------------------------- | |
| # Create GitHub Release with AI-generated release notes | |
| # --------------------------------------------------------------------------- | |
| github-release: | |
| needs: [prepare, release-notes, build, release-cli-desktop] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release notes | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 | |
| with: | |
| name: release-notes | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} | |
| VERSION: ${{ needs.prepare.outputs.version }} | |
| run: | | |
| echo "Creating GitHub Release for $RELEASE_TAG" | |
| gh release create "$RELEASE_TAG" \ | |
| --repo docker/model-runner \ | |
| --title "Docker Model Runner $RELEASE_TAG" \ | |
| --notes-file release-notes.md |