From 50da370c2a3c785c513073edf87fee3dc7d11db3 Mon Sep 17 00:00:00 2001 From: Wizerd Date: Thu, 4 Jan 2024 15:40:09 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BC=98=E5=8C=96=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-deploy.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-deploy.yml b/.github/workflows/docker-deploy.yml index 28b60fa..ecca836 100644 --- a/.github/workflows/docker-deploy.yml +++ b/.github/workflows/docker-deploy.yml @@ -25,15 +25,14 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Extract tag name - if: github.event_name == 'release' + - name: Set tag name id: tag_name - run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" - - - name: Set manual tag name - if: github.event_name == 'workflow_dispatch' - id: tag_name - run: echo "::set-output name=tag::${{ github.event.inputs.tag }}" + run: | + if [ "${{ github.event_name }}" = "release" ]; then + echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" + elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "::set-output name=tag::${{ github.event.inputs.tag }}" + fi - name: Build and push Docker image with Release tag uses: docker/build-push-action@v2