From 1a7f1a856bfd21da7ad91150baa798c98cf8c611 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 29 Nov 2022 10:27:55 +0100 Subject: [PATCH] ci: automatically update emqx/emqx:latest on releases --- .github/workflows/build_and_push_docker_images.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_push_docker_images.yaml b/.github/workflows/build_and_push_docker_images.yaml index 3372fefc9..7a30ca115 100644 --- a/.github/workflows/build_and_push_docker_images.yaml +++ b/.github/workflows/build_and_push_docker_images.yaml @@ -9,6 +9,9 @@ on: tags: - v* - e* + release: + types: + - published workflow_dispatch: inputs: branch_or_tag: @@ -41,9 +44,14 @@ jobs: cd source tag=${{ github.ref }} # tag docker-latest-ce or docker-latest-ee - if git describe --tags --exact --match 'docker-latest-*'; then + if git describe --tags --exact --match 'docker-latest-*' 2>/dev/null; then + echo 'docker_latest=true due to docker-latest-* tag' + docker_latest=true + elif [ "${{ github.event_name }}" = "release" ]; then + echo 'docker_latest=true due to release' docker_latest=true else + echo 'docker_latest=false' docker_latest=false fi if git describe --tags --match "[v|e]*" --exact; then