























@@ -438,6 +438,7 @@ jobs:
438438OPENCLAW_DOCKER_E2E_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.image }}
439439OPENCLAW_DOCKER_E2E_BARE_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.bare_image }}
440440OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.functional_image }}
441+OPENCLAW_CURRENT_PACKAGE_TGZ: .artifacts/docker-e2e-package/openclaw-current.tgz
441442OPENCLAW_SKIP_DOCKER_BUILD: "1"
442443INCLUDE_OPENWEBUI: ${{ inputs.include_openwebui }}
443444DOCKER_E2E_CHUNK: ${{ matrix.chunk_id }}
@@ -465,6 +466,12 @@ jobs:
465466 - name: Hydrate live auth/profile inputs
466467run: bash scripts/ci-hydrate-live-auth.sh
467468469+ - name: Download OpenClaw Docker E2E package
470+uses: actions/download-artifact@v8
471+with:
472+name: docker-e2e-package
473+path: .artifacts/docker-e2e-package
474+468475 - name: Pull shared Docker E2E image
469476shell: bash
470477run: |
@@ -623,6 +630,7 @@ jobs:
623630OPENCLAW_DOCKER_E2E_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.image }}
624631OPENCLAW_DOCKER_E2E_BARE_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.bare_image }}
625632OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE: ${{ needs.prepare_docker_e2e_image.outputs.functional_image }}
633+OPENCLAW_CURRENT_PACKAGE_TGZ: .artifacts/docker-e2e-package/openclaw-current.tgz
626634OPENCLAW_SKIP_DOCKER_BUILD: "1"
627635INCLUDE_OPENWEBUI: ${{ inputs.include_openwebui }}
628636DOCKER_E2E_LANES: ${{ inputs.docker_lanes }}
@@ -650,7 +658,31 @@ jobs:
650658 - name: Hydrate live auth/profile inputs
651659run: bash scripts/ci-hydrate-live-auth.sh
652660661+ - name: Detect targeted Docker lane image needs
662+id: lane_class
663+shell: bash
664+run: |
665+ set -euo pipefail
666+ needs_e2e=0
667+ IFS=', ' read -r -a lanes <<< "${DOCKER_E2E_LANES}"
668+ for lane in "${lanes[@]}"; do
669+ [[ -z "$lane" ]] && continue
670+ if [[ "$lane" != live-* ]]; then
671+ needs_e2e=1
672+ break
673+ fi
674+ done
675+ echo "needs_e2e=${needs_e2e}" >> "$GITHUB_OUTPUT"
676+677+ - name: Download OpenClaw Docker E2E package
678+if: steps.lane_class.outputs.needs_e2e == '1'
679+uses: actions/download-artifact@v8
680+with:
681+name: docker-e2e-package
682+path: .artifacts/docker-e2e-package
683+653684 - name: Pull shared Docker E2E images
685+if: steps.lane_class.outputs.needs_e2e == '1'
654686shell: bash
655687run: |
656688 set -euo pipefail
@@ -691,10 +723,9 @@ jobs:
691723 export OPENCLAW_DOCKER_ALL_LOG_DIR=".artifacts/docker-tests/targeted"
692724 export OPENCLAW_DOCKER_ALL_TIMINGS_FILE=".artifacts/docker-tests/targeted-timings.json"
693725 if [[ "$lanes" == *" live-"* ]]; then
694- export OPENCLAW_DOCKER_ALL_BUILD=1
695- else
696- export OPENCLAW_DOCKER_ALL_BUILD=0
726+ pnpm test:docker:live-build
697727 fi
728+ export OPENCLAW_DOCKER_ALL_BUILD=0
698729699730 pnpm test:docker:all
700731@@ -825,23 +856,77 @@ jobs:
825856 echo "Shared Docker E2E bare image: \`$bare_image\`" >> "$GITHUB_STEP_SUMMARY"
826857 echo "Shared Docker E2E functional image: \`$functional_image\`" >> "$GITHUB_STEP_SUMMARY"
827858859+ - name: Classify selected Docker lanes
860+id: lane_class
861+shell: bash
862+env:
863+DOCKER_E2E_LANES: ${{ inputs.docker_lanes }}
864+INCLUDE_RELEASE_PATH_SUITES: ${{ inputs.include_release_path_suites }}
865+INCLUDE_OPENWEBUI: ${{ inputs.include_openwebui }}
866+run: |
867+ set -euo pipefail
868+ needs_e2e=0
869+ if [[ "${INCLUDE_RELEASE_PATH_SUITES}" == "true" || "${INCLUDE_OPENWEBUI}" == "true" ]]; then
870+ needs_e2e=1
871+ elif [[ -n "${DOCKER_E2E_LANES}" ]]; then
872+ IFS=', ' read -r -a lanes <<< "${DOCKER_E2E_LANES}"
873+ for lane in "${lanes[@]}"; do
874+ [[ -z "$lane" ]] && continue
875+ if [[ "$lane" != live-* ]]; then
876+ needs_e2e=1
877+ break
878+ fi
879+ done
880+ fi
881+ echo "needs_e2e=${needs_e2e}" >> "$GITHUB_OUTPUT"
882+883+ - name: Setup Node environment
884+if: steps.lane_class.outputs.needs_e2e == '1'
885+uses: ./.github/actions/setup-node-env
886+with:
887+node-version: ${{ env.NODE_VERSION }}
888+pnpm-version: ${{ env.PNPM_VERSION }}
889+install-bun: "true"
890+891+ - name: Pack OpenClaw package for Docker E2E
892+if: steps.lane_class.outputs.needs_e2e == '1'
893+shell: bash
894+run: |
895+ set -euo pipefail
896+ mkdir -p .artifacts/docker-e2e-package
897+ pnpm build
898+ node --import tsx --input-type=module -e 'const { writePackageDistInventory } = await import("./src/infra/package-dist-inventory.ts"); await writePackageDistInventory(process.cwd());'
899+ npm pack --silent --ignore-scripts --pack-destination .artifacts/docker-e2e-package >/tmp/openclaw-docker-e2e-pack.out
900+ packed="$(tail -n 1 /tmp/openclaw-docker-e2e-pack.out | tr -d '\r')"
901+ mv ".artifacts/docker-e2e-package/$packed" .artifacts/docker-e2e-package/openclaw-current.tgz
902+903+ - name: Upload OpenClaw Docker E2E package
904+if: steps.lane_class.outputs.needs_e2e == '1'
905+uses: actions/upload-artifact@v7
906+with:
907+name: docker-e2e-package
908+path: .artifacts/docker-e2e-package/openclaw-current.tgz
909+if-no-files-found: error
910+828911 - name: Log in to GHCR
912+if: steps.lane_class.outputs.needs_e2e == '1'
829913uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
830914with:
831915registry: ghcr.io
832916username: ${{ github.actor }}
833917password: ${{ github.token }}
834918835919 - name: Setup Docker builder
920+if: steps.lane_class.outputs.needs_e2e == '1'
836921uses: useblacksmith/setup-docker-builder@ac083cc84672d01c60d5e8561d0a939b697de542 # v1
837922838923 - name: Build and push bare Docker E2E image
839-if: inputs.include_release_path_suites || inputs.docker_lanes != ''
924+if: steps.lane_class.outputs.needs_e2e == '1' && (inputs.include_release_path_suites || inputs.docker_lanes != '')
840925uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
841926with:
842927context: .
843928file: ./scripts/e2e/Dockerfile
844-target: build
929+target: bare
845930platforms: linux/amd64
846931cache-from: type=gha,scope=docker-e2e-bare
847932cache-to: type=gha,mode=max,scope=docker-e2e-bare
@@ -851,11 +936,14 @@ jobs:
851936push: true
852937853938 - name: Build and push functional Docker E2E image
939+if: steps.lane_class.outputs.needs_e2e == '1'
854940uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
855941with:
856942context: .
857943file: ./scripts/e2e/Dockerfile
858944target: functional
945+build-contexts: |
946+ openclaw_package=.artifacts/docker-e2e-package
859947 platforms: linux/amd64
860948cache-from: |
861949 type=gha,scope=docker-e2e-bare
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。