From c40b95de35ef3e2c2483c3213a54f058f1904689 Mon Sep 17 00:00:00 2001 From: Rory Z Date: Wed, 7 Sep 2022 10:42:54 +0800 Subject: [PATCH] ci(docker): add edition for docker image labels --- .../build_and_push_docker_images.yaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_push_docker_images.yaml b/.github/workflows/build_and_push_docker_images.yaml index c54ae7bd9..ae2cf4fa9 100644 --- a/.github/workflows/build_and_push_docker_images.yaml +++ b/.github/workflows/build_and_push_docker_images.yaml @@ -183,9 +183,19 @@ jobs: img_suffix="elixir-${{ matrix.arch }}" img_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}\n${img_labels}" fi + + if [ ${{ matrix.profile }} = "emqx" ]; then + img_labels="org.opencontainers.image.edition=Opensource\n${img_labels}" + fi + + if [ ${{ matrix.profile }} = "emqx-enterprise" ]; then + img_labels="org.opencontainers.image.edition=Enterprise\n${img_labels}" + fi + if [[ ${{ matrix.os[0] }} =~ "alpine" ]]; then img_suffix="${img_suffix}-alpine" fi + echo "::set-output name=emqx_name::${emqx_name}" echo "::set-output name=img_suffix::${img_suffix}" echo "::set-output name=img_labels::${img_labels}" @@ -299,10 +309,19 @@ jobs: img_suffix="elixir-${{ matrix.arch }}" img_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}\n$img_labels" fi + + if [ ${{ matrix.profile }} = "emqx" ]; then + img_labels="org.opencontainers.image.edition=Opensource\n${img_labels}" + fi + + if [ ${{ matrix.profile }} = "emqx-enterprise" ]; then + img_labels="org.opencontainers.image.edition=Enterprise\n${img_labels}" + fi + if [[ ${{ matrix.os[0] }} =~ "alpine" ]]; then img_suffix="${img_suffix}-alpine" fi - echo "::set-output name=img::${img}" + echo "::set-output name=emqx_name::${emqx_name}" echo "::set-output name=img_suffix::${img_suffix}" echo "::set-output name=img_labels::${img_labels}"