ci(build_packages): fix the "if" for push aws ecr image

This commit is contained in:
zhanghongtong 2022-02-08 16:41:16 +08:00
parent b6e3f66622
commit 3875d5c0e2
1 changed files with 3 additions and 1 deletions

View File

@ -557,7 +557,9 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Docker push to aws ecr
if: matrix.profile == 'emqx'
if: >
${{ (github.event_name == 'release' && !github.event.release.prerelease && matrix.profile == 'emqx')
|| (github.event.repository.owner != 'emqx' && startsWith(github.ref_name, 'ci/')) }}
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
for tag in $(echo ${{ steps.meta.outputs.json }} | jq -c '.tags[]'); do