From 5025f7951948333f59581ad9582abdf581f56600 Mon Sep 17 00:00:00 2001 From: Lan Liang Date: Thu, 2 May 2024 06:47:31 +0000 Subject: [PATCH] chore: Push the latest image on push master. Signed-off-by: Lan Liang --- .github/workflows/docker_image.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml index 94a7cc8fb..250b4763a 100644 --- a/.github/workflows/docker_image.yml +++ b/.github/workflows/docker_image.yml @@ -2,6 +2,9 @@ name: Push Docker Image on: workflow_dispatch: { } + push: + branches: + - master env: CI_RUST_TOOLCHAIN: 1.74.0 @@ -33,7 +36,12 @@ jobs: - name: Generate App Version id: generate_app_version - run: echo app_version=`git describe --tags --always` >> $GITHUB_OUTPUT + run: | + if [ ${{ github.event_name }} = "push" ];then + echo app_version=latest >> $GITHUB_OUTPUT + else + echo app_version=`git describe --tags --always` >> $GITHUB_OUTPUT + fi - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3