fix(core): publish multi-architecture images to ACR (#3814)

Add ACR-specific build and push steps to the Docker workflows while filtering ACR tags from the primary registry push.
This commit is contained in:
dsx137 2026-10-12 08:40:45 +00:00 committed by GitHub
parent 3b9890bf13
commit 7788c86721
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 51 additions and 7 deletions

View File

@ -149,6 +149,17 @@ jobs:
IMAGE_REGISTRIES: |
${{ secrets.DOCKER_USERNAME }}
ghcr.io/${{ github.repository_owner }}
registry.cn-hangzhou.aliyuncs.com/openimsdk
run: |
bash build/build_single.sh
- name: Build and push Docker images to ACR
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: '1'
RELEASE: "true"
PUSH: "true"
SERVICE: ${{ matrix.service }}
PLATFORMS: linux/amd64,linux/arm64
IMAGE_TAGS: ${{ steps.tags.outputs.tags }}
IMAGE_REGISTRIES: registry.cn-hangzhou.aliyuncs.com/openimsdk
run: |
bash build/build_single.sh

View File

@ -173,13 +173,46 @@ jobs:
- name: Push multi-architecture images
if: success()
env:
IMAGE_TAGS: ${{ steps.meta.outputs.tags }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
$(echo "${{ steps.meta.outputs.tags }}" | sed 's/,/ --tag /g' | sed 's/^/--tag /') \
--cache-from type=local,src=/tmp/docker-cache \
--push \
./main-repo
set -euo pipefail
tag_args=()
while IFS= read -r tag; do
[[ -n "$tag" ]] || continue
[[ "${tag%%/*}" != *.aliyuncs.com ]] || continue
tag_args+=(--tag "$tag")
done < <(printf '%s\n' "$IMAGE_TAGS" | tr ',' '\n')
if [[ ${#tag_args[@]} -gt 0 ]]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
"${tag_args[@]}" \
--cache-from type=local,src=/tmp/docker-cache \
--push ./main-repo
fi
- name: Push multi-architecture images to ACR
if: success()
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: '1'
IMAGE_TAGS: ${{ steps.meta.outputs.tags }}
run: |
set -euo pipefail
tag_args=()
while IFS= read -r tag; do
[[ -n "$tag" ]] || continue
[[ "${tag%%/*}" == *.aliyuncs.com ]] || continue
tag_args+=(--tag "$tag")
done < <(printf '%s\n' "$IMAGE_TAGS" | tr ',' '\n')
if [[ ${#tag_args[@]} -gt 0 ]]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
"${tag_args[@]}" \
--cache-from type=local,src=/tmp/docker-cache \
--push ./main-repo
fi
- name: Verify multi-platform support
run: |