@@ -447,62 +447,115 @@ jobs:
447447 echo "✅ model-cli-release workflow triggered"
448448
449449 # ---------------------------------------------------------------------------
450- # Trigger Docker CE packaging workflow
450+ # Trigger Docker CE packaging workflow, wait for it, then trigger release-repo
451451 # ---------------------------------------------------------------------------
452452 trigger-packaging :
453453 if : ${{ !inputs.skipPackaging }}
454454 needs : [prepare, trigger-model-cli-release]
455455 runs-on : ubuntu-latest
456+ timeout-minutes : 120
456457 permissions :
457458 contents : read
458459 steps :
459460 - name : Trigger release-model workflow in packaging repo
461+ id : trigger
460462 env :
461463 GH_TOKEN : ${{ secrets.CLI_RELEASE_PAT }}
462464 RELEASE_TAG : ${{ needs.prepare.outputs.release_tag }}
463465 run : |
464466 echo "📦 Triggering release-model workflow in docker/packaging"
465- echo " tag_ref : $RELEASE_TAG"
467+ echo " ref : $RELEASE_TAG"
466468 gh workflow run release-model.yml \
467469 --repo docker/packaging \
468470 -f ref="$RELEASE_TAG"
469471 echo "✅ release-model workflow triggered in docker/packaging"
470472
471- - name : Post instructions for release-repo
473+ - name : Wait for packaging workflow to complete
474+ id : packaging
472475 env :
476+ GH_TOKEN : ${{ secrets.CLI_RELEASE_PAT }}
473477 VERSION : ${{ needs.prepare.outputs.version }}
474- RELEASE_TAG : ${{ needs.prepare.outputs.release_tag }}
475478 run : |
476- cat >> "$GITHUB_STEP_SUMMARY" <<-SUMMARY
477- ## 📋 Next Steps: Release to Docker CE
479+ echo "⏳ Waiting for packaging workflow to appear..."
480+ sleep 15
481+
482+ # Find the most recent run of release-model.yml
483+ for i in $(seq 1 10); do
484+ RUN_ID=$(gh run list \
485+ --repo docker/packaging \
486+ --workflow release-model.yml \
487+ --limit 1 \
488+ --json databaseId,createdAt \
489+ --jq '.[0].databaseId')
490+ if [ -n "$RUN_ID" ]; then
491+ echo "Found packaging run: $RUN_ID"
492+ break
493+ fi
494+ echo " Retry $i/10..."
495+ sleep 10
496+ done
478497
479- The \`release-model\` workflow has been triggered in \`docker/packaging\`.
480- Once it completes, follow these manual steps:
498+ if [ -z "$RUN_ID" ]; then
499+ echo "::error::Could not find packaging workflow run"
500+ exit 1
501+ fi
481502
482- ### 1. Get the packaging image tag
503+ echo "⏳ Waiting for packaging run $RUN_ID to complete..."
504+ gh run watch "$RUN_ID" \
505+ --repo docker/packaging \
506+ --exit-status
483507
484- Check the [release-model workflow runs](https://github.com/docker/packaging/actions/workflows/release-model.yml)
485- for the image tag. It will look like:
486- \`\`\`
487- dockereng/packaging:model-v${VERSION}-<build_number>
488- \`\`\`
508+ # Get the run number to construct the image tag
509+ RUN_NUMBER=$(gh run view "$RUN_ID" \
510+ --repo docker/packaging \
511+ --json number \
512+ --jq '.number')
489513
490- ### 2. Trigger the plugin release
514+ PACKAGING_IMAGE="dockereng/packaging:model-v${VERSION}-${RUN_NUMBER}"
515+ echo "📦 Packaging image: $PACKAGING_IMAGE"
516+ echo "packaging_image=$PACKAGING_IMAGE" >> "$GITHUB_OUTPUT"
517+ echo "✅ Packaging workflow completed successfully"
491518
492- Run the [release buildx, compose, model, cagent](https://github.com/docker/release-repo/actions/workflows/plugin.yml) workflow with:
519+ - name : Trigger release-repo plugin workflow
520+ env :
521+ GH_TOKEN : ${{ secrets.CLI_RELEASE_PAT }}
522+ VERSION : ${{ needs.prepare.outputs.version }}
523+ PACKAGING_IMAGE : ${{ steps.packaging.outputs.packaging_image }}
524+ run : |
525+ echo "🚀 Triggering plugin release in docker/release-repo"
526+ echo " packaging_image: $PACKAGING_IMAGE"
527+ echo " model_version: $VERSION"
528+ echo " channel: stable"
529+ echo " release_live: true"
530+ gh workflow run plugin.yml \
531+ --repo docker/release-repo \
532+ --ref production \
533+ -f packaging_image="$PACKAGING_IMAGE" \
534+ -f model_version="$VERSION" \
535+ -f channel=stable \
536+ -f release_live=true
537+ echo "✅ Plugin release workflow triggered in docker/release-repo"
538+
539+ - name : Post summary
540+ env :
541+ VERSION : ${{ needs.prepare.outputs.version }}
542+ RELEASE_TAG : ${{ needs.prepare.outputs.release_tag }}
543+ PACKAGING_IMAGE : ${{ steps.packaging.outputs.packaging_image }}
544+ run : |
545+ cat >> "$GITHUB_STEP_SUMMARY" <<-SUMMARY
546+ ## 📦 Docker CE Packaging & Release
493547
494- | Parameter | Value |
495- |-----------|-------|
496- | **Image** | \`dockereng/packaging:model-v${VERSION}-<build_number>\` |
497- | **Expected version** | \`${VERSION}\` (no v-prefix) |
498- | **Release channel** | \`stable\` |
499- | **Deploy to live** | ✅ Yes |
548+ | Step | Status |
549+ |------|--------|
550+ | Packaging image | \`${PACKAGING_IMAGE}\` |
551+ | Model version | \`${VERSION}\` |
552+ | Release channel | \`stable\` |
553+ | Deploy to live | ✅ Yes |
554+ | Release tag | \`${RELEASE_TAG}\` |
500555
501- > **Tag reference used:** \`${RELEASE_TAG}\`
556+ The plugin release workflow has been triggered in [docker/release-repo](https://github.com/docker/release-repo/actions/workflows/plugin.yml).
502557 SUMMARY
503558
504- echo "📋 Instructions for docker/release-repo have been added to the job summary"
505-
506559 # ---------------------------------------------------------------------------
507560 # Create GitHub Release with AI-generated release notes
508561 # ---------------------------------------------------------------------------
0 commit comments