From d7d9d3581a2d30dbea27a1ee8644871be3ef35fc Mon Sep 17 00:00:00 2001 From: Zhenghao Zhang <33406104+zhangzhenghao@users.noreply.github.com> Date: Tue, 14 Dec 2021 20:43:43 +0800 Subject: [PATCH] optimize docker image version (#335) --- .github/workflows/build_docker.yml | 2 +- .github/workflows/build_release.yml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 5e618dd6f..4fc34a762 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -32,4 +32,4 @@ jobs: platforms: linux/amd64,linux/arm64 file: docker/${{ matrix.image }}/Dockerfile push: true - tags: zhenghaoz/${{ matrix.image }}:latest + tags: zhenghaoz/${{ matrix.image }}:nightly diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 3b52bdfa4..19d1214a8 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -65,9 +65,9 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - uses: olegtarasov/get-tag@v2.1 - id: tag_name - + - id: get_version + uses: battila7/get-version-action@v2 + - name: Build docker image uses: docker/build-push-action@v2 with: @@ -75,4 +75,7 @@ jobs: platforms: linux/amd64,linux/arm64 file: docker/${{ matrix.image }}/Dockerfile push: true - tags: zhenghaoz/${{ matrix.image }}:${{ steps.tag_name.outputs.tag }} + tags: | + zhenghaoz/${{ matrix.image }}:latest + zhenghaoz/${{ matrix.image }}:${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor }} + zhenghaoz/${{ matrix.image }}:${{ steps.get_version.outputs.version-without-v }}