ci(cross build): fix push aws ecr error when single arch image

This commit is contained in:
zhanghongtong 2022-03-15 11:34:03 +08:00
parent 20e2c41975
commit 2f7f021197
1 changed files with 5 additions and 2 deletions

View File

@ -458,8 +458,11 @@ jobs:
- name: Docker push to aws ecr
if: matrix.profile == 'emqx' && matrix.arch == 'amd64' && startsWith(github.ref, 'refs/tags/')
run: |
IsPushLatest=${{ github.event_name == 'release' && !github.event.release.prerelease }};
scripts/docker-create-push-manifests.sh "${{ steps.login-ecr.outputs.registry }}/${{ steps.meta.outputs.tags }}" "$IsPushLatest"
for tag in $(echo ${{ steps.meta.outputs.json }} | jq -c '.tags[]'); do
docker pull "$tag"
docker tag "$tag" "${{ steps.login-ecr.outputs.registry }}/$tag"
docker push "${{ steps.login-ecr.outputs.registry }}/$tag"
done
docker-push-multi-arch-manifest:
# note, we only run on amd64