From 3875d5c0e217c380952e7b7e10bd61c28917ea0e Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Tue, 8 Feb 2022 16:41:16 +0800 Subject: [PATCH] ci(build_packages): fix the "if" for push aws ecr image --- .github/workflows/build_packages.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index f8986df43..20067af4c 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -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