Skip to content

2.7.1/aliyun#7

Open
chongyuanyin wants to merge 2 commits into
mainfrom
2.7.1/aliyun
Open

2.7.1/aliyun#7
chongyuanyin wants to merge 2 commits into
mainfrom
2.7.1/aliyun

Conversation

@chongyuanyin

Copy link
Copy Markdown
Member

No description provided.

@chongyuanyin chongyuanyin requested a review from a team July 6, 2026 08:20
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
with:
registry: registry-intl.cn-shanghai.aliyuncs.com
Comment on lines +118 to +196
name: push multi-arch manifest for ecp-ai
runs-on: ubuntu-22.04
needs: [build-docker-images]
steps:
- uses: actions/checkout@v4
- name: Check latest image
id: latest
run: |
echo "latest=false" >> $GITHUB_OUTPUT
if echo "${{ github.ref_name }}" |egrep -q "^[0-9].[0-9].[0-9]$"; then
echo "latest=true" >> $GITHUB_OUTPUT
fi
- name: Cusmoter image tag
id: customer
run: |
tag="${GITHUB_REF##*/}"
echo "tag=$tag" >> $GITHUB_OUTPUT
- uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/emqxecp/ecp-ai
flavor: |
latest=${{ steps.latest.outputs.latest }}
tags: |
type=raw,enable=${{ contains(github.ref_name, 'customer') }},value=${{ steps.customer.outputs.tag }}
type=ref,event=branch,enable=${{ !contains(github.ref_name, 'customer') }}
type=ref,event=pr,enable=${{ !contains(github.ref_name, 'customer') }}
type=ref,event=tag,enable=${{ !contains(github.ref_name, 'customer') }}
type=semver,pattern={{version}},enable=${{ !contains(github.ref_name, 'customer') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ !contains(github.ref_name, 'customer') }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
with:
registry: registry-intl.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALIYUN_REGISTRY_USERNAME }}
password: ${{ secrets.ALIYUN_REGISTRY_PASSWORD }}
- uses: actions/download-artifact@v4
with:
name: ecp-ai-digest-amd64
path: digests/amd64
- uses: actions/download-artifact@v4
with:
name: ecp-ai-digest-arm64
path: digests/arm64
- name: Create and push multi-arch manifest
run: |
amd64=$(cat digests/amd64/ecp-ai-digest.txt)
arm64=$(cat digests/arm64/ecp-ai-digest.txt)
readarray -t tags <<< "${{ steps.meta.outputs.tags }}"
for tag in "${tags[@]}"; do
docker buildx imagetools create -t "$tag" \
ghcr.io/emqxecp/ecp-ai@${amd64} \
ghcr.io/emqxecp/ecp-ai@${arm64}
done
- name: Push to Aliyun ACR
run: |
# Get digest from artifacts
amd64=$(cat digests/amd64/ecp-ai-digest.txt)
arm64=$(cat digests/arm64/ecp-ai-digest.txt)

# Pull amd64 image by digest and push to Aliyun with fixed tag 2.7.1
docker pull ghcr.io/emqxecp/ecp-ai@${amd64}
docker tag ghcr.io/emqxecp/ecp-ai@${amd64} registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-amd64
docker push registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-amd64

# Pull arm64 image by digest and push to Aliyun with fixed tag 2.7.1
docker pull ghcr.io/emqxecp/ecp-ai@${arm64}
docker tag ghcr.io/emqxecp/ecp-ai@${arm64} registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-arm64
docker push registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-arm64

# Create and push multi-arch manifest
docker manifest create registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1 \
registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-amd64 \
registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1-arm64
docker manifest push registry-intl.cn-shanghai.aliyuncs.com/bchub/ecp-ai:2.7.1 No newline at end of file
run: |
tag="${GITHUB_REF##*/}"
echo "tag=$tag" >> $GITHUB_OUTPUT
- uses: docker/metadata-action@v4
type=ref,event=tag,enable=${{ !contains(github.ref_name, 'customer') }}
type=semver,pattern={{version}},enable=${{ !contains(github.ref_name, 'customer') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ !contains(github.ref_name, 'customer') }}
- uses: docker/login-action@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.EMQXECP_GIT_TOKEN }}
- uses: docker/login-action@v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants