From 36fc3ecec9c26ad09d1c321d2bdf08247f00b74e Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Mon, 9 Oct 2023 15:30:14 +0800 Subject: [PATCH] Fix: releases docker get version error --- .github/workflows/release_docker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 2dd3fa4..095fb29 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -3,7 +3,7 @@ name: release_docker on: push: tags: - - "*" + - "v*" jobs: release_docker: @@ -31,13 +31,17 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT + - name: Build and push id: docker_build uses: docker/build-push-action@v5 with: context: . build-args: | - VERSION=${{ steps.meta.outputs.tags }} + VERSION="v${{ steps.get_version.outputs.VERSION }}" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}