ci: do not push emqx-enterprise docker images to public.ecr.aws

This commit is contained in:
Ivan Dyachkov 2024-03-05 10:53:58 +01:00
parent 9c0ab450a0
commit d9c982d850
2 changed files with 8 additions and 15 deletions

View File

@ -112,8 +112,8 @@ jobs:
fail-fast: false
matrix:
profile:
- ${{ inputs.profile }}
- ${{ inputs.profile }}-elixir
- ["${{ inputs.profile }}", "${{ inputs.profile == 'emqx' && 'docker.io,public.ecr.aws' || 'docker.io' }}"]
- ["${{ inputs.profile }}-elixir", "${{ inputs.profile == 'emqx' && 'docker.io,public.ecr.aws' || 'docker.io' }}"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@ -121,7 +121,7 @@ jobs:
ref: ${{ github.event.inputs.ref }}
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
pattern: "${{ matrix.profile }}-*.tar.gz"
pattern: "${{ matrix.profile[0] }}-*.tar.gz"
path: _packages
merge-multiple: true
@ -158,8 +158,8 @@ jobs:
- name: Build docker image
env:
PROFILE: ${{ matrix.profile }}
DOCKER_REGISTRY: 'docker.io,public.ecr.aws'
PROFILE: ${{ matrix.profile[0] }}
DOCKER_REGISTRY: ${{ matrix.profile[1] }}
DOCKER_ORG: ${{ github.repository_owner }}
DOCKER_LATEST: ${{ inputs.latest }}
DOCKER_PUSH: false
@ -175,7 +175,10 @@ jobs:
EMQX_SOURCE_TYPE: tgz
run: |
./build ${PROFILE} docker
echo "Built tags:"
echo "==========="
cat .emqx_docker_image_tags
echo "==========="
echo "_EMQX_DOCKER_IMAGE_TAG=$(head -n 1 .emqx_docker_image_tags)" >> $GITHUB_ENV
- name: smoke test

10
build
View File

@ -385,16 +385,6 @@ docker_cleanup() {
[ -f ./.dockerignore.bak ] && mv ./.dockerignore.bak ./.dockerignore >/dev/null || true
}
function is_ecr_and_enterprise() {
local registry="$1"
local profile="$2"
if [[ "$registry" == public.ecr.aws* ]] && [[ "$profile" == *enterprise* ]]; then
return 0
else
return 1
fi
}
## Build the default docker image based on debian 11.
make_docker() {
local EMQX_BUILDER_VERSION="${EMQX_BUILDER_VERSION:-5.3-2}"