mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 05:02:11 +08:00
build: update verify support.
This commit is contained in:
parent
0c09dd7535
commit
c02436a5c8
12
.github/workflows/publish-docker-image.yml
vendored
12
.github/workflows/publish-docker-image.yml
vendored
@ -151,22 +151,22 @@ jobs:
|
||||
|
||||
- name: Verify multi-platform support
|
||||
run: |
|
||||
for dir in build/images/*/; do
|
||||
IMAGE_NAME=$(basename "$dir" | tr '[:upper:]' '[:lower:]')
|
||||
images=("openim/openim-server" "ghcr.io/openimsdk/openim-server" "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server")
|
||||
for image in "${images[@]}"; do
|
||||
for tag in $(echo "${{ steps.meta.outputs.tags }}" | tr ',' '\n'); do
|
||||
manifest=$(docker manifest inspect "${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME:$tag" || echo "error")
|
||||
manifest=$(docker manifest inspect "$image:$tag" || echo "error")
|
||||
if [[ "$manifest" == "error" ]]; then
|
||||
echo "Manifest not found for $IMAGE_NAME:$tag"
|
||||
echo "Manifest not found for $image:$tag"
|
||||
exit 1
|
||||
fi
|
||||
amd64_found=$(echo "$manifest" | jq '.manifests[] | select(.platform.architecture == "amd64")')
|
||||
arm64_found=$(echo "$manifest" | jq '.manifests[] | select(.platform.architecture == "arm64")')
|
||||
if [[ -z "$amd64_found" ]]; then
|
||||
echo "Multi-platform support check failed for $IMAGE_NAME:$tag - missing amd64"
|
||||
echo "Multi-platform support check failed for $image:$tag - missing amd64"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "$arm64_found" ]]; then
|
||||
echo "Multi-platform support check failed for $IMAGE_NAME:$tag - missing arm64"
|
||||
echo "Multi-platform support check failed for $image:$tag - missing arm64"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user