File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -382,10 +382,6 @@ jobs:
382382 with :
383383 name : docker-arm
384384 path : docker-arm
385- - run : |
386- mkdir -p merged
387- tar -xf docker-amd/multi-platform-image.tar -C merged
388- tar -xf docker-arm/multi-platform-image.tar -C merged
389385 - uses : docker/setup-qemu-action@v3
390386 with :
391387 platforms : ${{ env.platforms }}
@@ -423,15 +419,17 @@ jobs:
423419 with :
424420 name : docker-extra
425421 path : multi-platform-extra.tar
426- if-no-files-found : error
427- - run : tar -cvf multi-platform-extra.tar -C merged/ .
422+ if-no-files-found : error
428423
429- # 合并 docker job 的产物和当前产物
430424 - name : Merge all platform images
431425 run : |
432- for img in merged/* .tar; do
433- docker load < "$img"
434- done
426+ mkdir -p arm-oci && tar -vxf docker-arm/multi-platform-image .tar -C arm-oci
427+ mkdir -p amd-oci && tar -vxf docker-amd/multi-platform-image.tar -C amd-oci
428+ mkdir -p ext-oci && tar -vxf multi-platform-extra.tar -C ext-oci
435429 for tag in ${{ steps.meta.outputs.tags }}; do
436- docker buildx imagetools create --tag $tag $(docker images --format '{{.Repository}}:{{.Tag}}' | grep ddns:)
430+ docker buildx imagetools create --tag "$tag" \
431+ -f arm-oci/index.json \
432+ -f amd-oci/index.json \
433+ -f ext-oci/index.json \
434+ --annotation "DOCKER_METADATA_OUTPUT_ANNOTATIONS"
437435 done
You can’t perform that action at this time.
0 commit comments