From e91d22b0d555f550ea5c3aeb82243f1187a16cf7 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 15 Aug 2023 19:28:31 +0200 Subject: [PATCH 1/2] ci(docker): emqx-enterprise repo does not exist in ECR --- .github/workflows/_pr_entrypoint.yaml | 3 ++- .github/workflows/build_and_push_docker_images.yaml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_pr_entrypoint.yaml b/.github/workflows/_pr_entrypoint.yaml index ec2bbf2e1..d52001c3c 100644 --- a/.github/workflows/_pr_entrypoint.yaml +++ b/.github/workflows/_pr_entrypoint.yaml @@ -63,7 +63,8 @@ jobs: ./actionlint -color \ -shellcheck= \ -ignore 'label ".+" is unknown' \ - -ignore 'value "emqx-enterprise" in "exclude"' + -ignore 'value "emqx-enterprise" in "exclude"' \ + -ignore 'value "emqx-enterprise-elixir" in "exclude"' - name: Check line-break at EOF run: | ./scripts/check-nl-at-eof.sh diff --git a/.github/workflows/build_and_push_docker_images.yaml b/.github/workflows/build_and_push_docker_images.yaml index b0d6aa481..b2bfe735b 100644 --- a/.github/workflows/build_and_push_docker_images.yaml +++ b/.github/workflows/build_and_push_docker_images.yaml @@ -88,6 +88,11 @@ jobs: registry: - 'docker.io' - 'public.ecr.aws' + exclude: + - profile: emqx-enterprise + registry: 'public.ecr.aws' + - profile: emqx-enterprise-elixir + registry: 'public.ecr.aws' steps: - uses: actions/checkout@v3 From f00553a17407c24aa661dcfe2e2f24307efa0670 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 15 Aug 2023 19:29:09 +0200 Subject: [PATCH 2/2] ci(release): do not publish prerelease artifacts to emqx.io, packagecloud and helm repo --- .github/workflows/release.yaml | 3 ++- .github/workflows/upload-helm-charts.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1945caab0..ab145a764 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,7 +59,7 @@ jobs: with: asset_paths: '["packages/*"]' - name: update to emqx.io - if: startsWith(github.ref_name, 'v') && (github.event_name == 'release' || inputs.publish_release_artefacts) + if: startsWith(github.ref_name, 'v') && ((github.event_name == 'release' && !github.event.prerelease) || inputs.publish_release_artefacts) run: | set -eux curl -w %{http_code} \ @@ -70,6 +70,7 @@ jobs: -d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ github.ref_name }}\" }" \ ${{ secrets.EMQX_IO_RELEASE_API }} - name: Push to packagecloud.io + if: (github.event_name == 'release' && !github.event.prerelease) || inputs.publish_release_artefacts env: PROFILE: ${{ steps.profile.outputs.profile }} VERSION: ${{ steps.profile.outputs.version }} diff --git a/.github/workflows/upload-helm-charts.yaml b/.github/workflows/upload-helm-charts.yaml index 139809441..593a78a7c 100644 --- a/.github/workflows/upload-helm-charts.yaml +++ b/.github/workflows/upload-helm-charts.yaml @@ -43,6 +43,7 @@ jobs: ;; esac - uses: emqx/push-helm-action@v1.1 + if: github.event_name == 'release' && !github.event.prerelease with: charts_dir: "${{ github.workspace }}/deploy/charts/${{ steps.profile.outputs.profile }}" version: ${{ steps.profile.outputs.version }}