mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-11-17 14:13:49 +08:00
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:
parent
3b9890bf13
commit
7788c86721
@ -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
|
||||
|
||||
45
.github/workflows/publish-docker-image.yml
vendored
45
.github/workflows/publish-docker-image.yml
vendored
@ -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: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user