|
32 | 32 | required: false |
33 | 33 | type: string |
34 | 34 | imagesOnly: |
35 | | - description: "Only build and push Docker images (skip CLI releases, pinata bump, docs update, and CE packaging)" |
| 35 | + description: "Only build and push Docker images (skip CLI releases and CE packaging)" |
36 | 36 | required: false |
37 | 37 | type: boolean |
38 | 38 | default: false |
@@ -487,189 +487,6 @@ jobs: |
487 | 487 | --exit-status |
488 | 488 | echo "✅ Desktop CLI release completed successfully" |
489 | 489 |
|
490 | | - # --------------------------------------------------------------------------- |
491 | | - # Bump docker-model version in pinata and open a PR |
492 | | - # --------------------------------------------------------------------------- |
493 | | - bump-pinata: |
494 | | - if: ${{ !inputs.imagesOnly }} |
495 | | - needs: [prepare, release-cli-desktop] |
496 | | - runs-on: ubuntu-latest |
497 | | - permissions: |
498 | | - contents: read |
499 | | - steps: |
500 | | - - name: Checkout pinata |
501 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
502 | | - with: |
503 | | - repository: docker/pinata |
504 | | - token: ${{ secrets.CLI_RELEASE_PAT }} |
505 | | - fetch-depth: 0 |
506 | | - |
507 | | - - name: Set up Go |
508 | | - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c |
509 | | - with: |
510 | | - go-version-file: 'go.mod' |
511 | | - cache: true |
512 | | - |
513 | | - - name: Fetch latest llamacpp version from Docker Hub |
514 | | - id: llamacpp |
515 | | - run: | |
516 | | - TAGS_JSON=$(curl -s "https://hub.docker.com/v2/repositories/docker/docker-model-backend-llamacpp/tags?page_size=25&ordering=last_updated") |
517 | | - LLAMACPP_VERSION=$(echo "$TAGS_JSON" | jq -r ' |
518 | | - (.results[] | select(.name == "latest-cpu") | .digest) as $d | |
519 | | - .results[] | select(.name != "latest-cpu" and (.name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-cpu$")) and .digest == $d) | .name | split("-")[0] |
520 | | - ') |
521 | | - if [ -z "$LLAMACPP_VERSION" ] || [ "$LLAMACPP_VERSION" = "null" ]; then |
522 | | - echo "::error::Failed to fetch latest llamacpp version from Docker Hub" |
523 | | - exit 1 |
524 | | - fi |
525 | | - echo "version=$LLAMACPP_VERSION" >> "$GITHUB_OUTPUT" |
526 | | - echo "📦 Latest llamacpp version: $LLAMACPP_VERSION" |
527 | | -
|
528 | | - - name: Bump docker-model and llamacpp versions in build.json |
529 | | - env: |
530 | | - VERSION: ${{ needs.prepare.outputs.version }} |
531 | | - LLAMACPP_VERSION: ${{ steps.llamacpp.outputs.version }} |
532 | | - run: | |
533 | | - NEW_VERSION="v${VERSION}" |
534 | | - jq --arg model_v "$NEW_VERSION" --arg llama_v "$LLAMACPP_VERSION" ' |
535 | | - .["docker-model"].version = $model_v | |
536 | | - .["llamacpp"].version = $llama_v |
537 | | - ' build.json > build.json.tmp |
538 | | - mv build.json.tmp build.json |
539 | | -
|
540 | | - - name: Bump model-runner Go dependency |
541 | | - env: |
542 | | - VERSION: ${{ needs.prepare.outputs.version }} |
543 | | - run: | |
544 | | - go get github.com/docker/model-runner@v${VERSION} |
545 | | - go mod tidy |
546 | | - go mod vendor |
547 | | -
|
548 | | - - name: Create pull request |
549 | | - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 |
550 | | - with: |
551 | | - token: ${{ secrets.CLI_RELEASE_PAT }} |
552 | | - base: main |
553 | | - commit-message: "chore: bump docker-model to v${{ needs.prepare.outputs.version }} and llamacpp to ${{ steps.llamacpp.outputs.version }}" |
554 | | - branch: bump-docker-model-v${{ needs.prepare.outputs.version }} |
555 | | - title: "Bump docker-model to v${{ needs.prepare.outputs.version }} and llamacpp to ${{ steps.llamacpp.outputs.version }}" |
556 | | - body: | |
557 | | - ### Ticket(s) |
558 | | -
|
559 | | - N/A — automated version bump |
560 | | -
|
561 | | - ### What this PR does |
562 | | -
|
563 | | - - Bumps docker-model version to v${{ needs.prepare.outputs.version }} in build.json. |
564 | | - - Bumps llamacpp version to ${{ steps.llamacpp.outputs.version }} in build.json (latest from [Docker Hub](https://hub.docker.com/r/docker/docker-model-backend-llamacpp/tags)). |
565 | | - - Updates `github.com/docker/model-runner` Go module to v${{ needs.prepare.outputs.version }} (go get + go mod tidy + go mod vendor). |
566 | | -
|
567 | | - ### Notes for the reviewer |
568 | | -
|
569 | | - Automated PR created by the model-runner release workflow. |
570 | | -
|
571 | | - draft: true |
572 | | - |
573 | | - # --------------------------------------------------------------------------- |
574 | | - # Update CLI reference docs in docker/docs |
575 | | - # --------------------------------------------------------------------------- |
576 | | - update-docs: |
577 | | - if: ${{ !inputs.imagesOnly }} |
578 | | - needs: [prepare] |
579 | | - runs-on: ubuntu-latest |
580 | | - permissions: |
581 | | - contents: read |
582 | | - steps: |
583 | | - - name: Check if CLI docs changed |
584 | | - id: check-docs |
585 | | - env: |
586 | | - GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }} |
587 | | - RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} |
588 | | - PREVIOUS_TAG: ${{ needs.prepare.outputs.previous_tag }} |
589 | | - run: | |
590 | | - if [ -z "$PREVIOUS_TAG" ]; then |
591 | | - echo "No previous tag — assuming docs changed" |
592 | | - echo "changed=true" >> "$GITHUB_OUTPUT" |
593 | | - exit 0 |
594 | | - fi |
595 | | - CHANGED=$(gh api repos/docker/model-runner/compare/${PREVIOUS_TAG}...${RELEASE_TAG} \ |
596 | | - --jq '[.files[].filename | select(startswith("cmd/cli/docs/reference/"))] | length') |
597 | | - if [ "$CHANGED" -gt 0 ]; then |
598 | | - echo "CLI docs changed ($CHANGED files)" |
599 | | - echo "changed=true" >> "$GITHUB_OUTPUT" |
600 | | - else |
601 | | - echo "No CLI docs changes between $PREVIOUS_TAG and $RELEASE_TAG — skipping" |
602 | | - echo "changed=false" >> "$GITHUB_OUTPUT" |
603 | | - fi |
604 | | -
|
605 | | - - name: Checkout model-runner |
606 | | - if: steps.check-docs.outputs.changed == 'true' |
607 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
608 | | - |
609 | | - - name: Load GO version |
610 | | - if: steps.check-docs.outputs.changed == 'true' |
611 | | - id: versions |
612 | | - uses: ./.github/actions/load-go-version |
613 | | - |
614 | | - - name: Checkout docs |
615 | | - if: steps.check-docs.outputs.changed == 'true' |
616 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
617 | | - with: |
618 | | - repository: docker/docs |
619 | | - token: ${{ secrets.CLI_RELEASE_PAT }} |
620 | | - fetch-depth: 0 |
621 | | - |
622 | | - - name: Set up Go |
623 | | - if: steps.check-docs.outputs.changed == 'true' |
624 | | - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c |
625 | | - with: |
626 | | - go-version: ${{ steps.versions.outputs.go-version }} |
627 | | - cache: true |
628 | | - |
629 | | - - name: Vendor model-runner CLI docs |
630 | | - if: steps.check-docs.outputs.changed == 'true' |
631 | | - env: |
632 | | - RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} |
633 | | - run: | |
634 | | - VENDOR_MODULE=github.com/docker/model-runner@${RELEASE_TAG} make vendor |
635 | | - # Remove the second require block added by `go get` — the docs repo |
636 | | - # only needs the direct dependency in the first require block. |
637 | | - awk '/^require \(/{n++} n==2{if(/^\)/) n=3; next} n!=2' go.mod > go.mod.tmp && mv go.mod.tmp go.mod |
638 | | - cat -s go.mod > go.mod.tmp && mv go.mod.tmp go.mod |
639 | | -
|
640 | | - - name: Create pull request |
641 | | - if: steps.check-docs.outputs.changed == 'true' |
642 | | - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 |
643 | | - with: |
644 | | - token: ${{ secrets.DOCKER_DOCS }} |
645 | | - base: main |
646 | | - push-to-fork: ilopezluna/docs |
647 | | - commit-message: | |
648 | | - vendor: github.com/docker/model-runner ${{ needs.prepare.outputs.release_tag }} |
649 | | -
|
650 | | - See changes in https://github.com/docker/model-runner/compare/${{ needs.prepare.outputs.previous_tag }}...${{ needs.prepare.outputs.release_tag }}. |
651 | | - branch: update-model-runner-${{ needs.prepare.outputs.release_tag }} |
652 | | - title: "vendor: github.com/docker/model-runner ${{ needs.prepare.outputs.release_tag }}" |
653 | | - body: | |
654 | | - ## Description |
655 | | -
|
656 | | - Update Model Runner CLI docs. |
657 | | - See changes in https://github.com/docker/model-runner/compare/${{ needs.prepare.outputs.previous_tag }}...${{ needs.prepare.outputs.release_tag }}. |
658 | | -
|
659 | | - ``` |
660 | | - VENDOR_MODULE=github.com/docker/model-runner@${{ needs.prepare.outputs.release_tag }} make vendor |
661 | | - ``` |
662 | | -
|
663 | | - ## Reviews |
664 | | -
|
665 | | - <!-- Notes for reviewers here --> |
666 | | - <!-- List applicable reviews (optionally @tag reviewers) --> |
667 | | -
|
668 | | - - [ ] Technical review |
669 | | - - [ ] Editorial review |
670 | | - - [ ] Product review |
671 | | - draft: true |
672 | | - |
673 | 490 | # --------------------------------------------------------------------------- |
674 | 491 | # Release CLI for Docker CE — build .deb/.rpm packages and deploy |
675 | 492 | # |
@@ -785,7 +602,7 @@ jobs: |
785 | 602 | # Create GitHub Release with AI-generated release notes |
786 | 603 | # --------------------------------------------------------------------------- |
787 | 604 | github-release: |
788 | | - needs: [prepare, release-notes, build, release-cli-desktop, bump-pinata, update-docs, verify-docker-ce] |
| 605 | + needs: [prepare, release-notes, build, release-cli-desktop, verify-docker-ce] |
789 | 606 | if: ${{ !cancelled() && !contains(needs.*.result, 'failure') }} |
790 | 607 | runs-on: ubuntu-latest |
791 | 608 | permissions: |
|
0 commit comments