From ef5865b0e243d06da0a05a827a088a0b3aee85e9 Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Thu, 18 Jan 2024 15:41:06 +0800 Subject: [PATCH] fix remove v error Signed-off-by: LiZhenCheng9527 --- .github/workflows/release-image.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-image.yaml b/.github/workflows/release-image.yaml index 382afa57b..a89d75042 100644 --- a/.github/workflows/release-image.yaml +++ b/.github/workflows/release-image.yaml @@ -8,11 +8,11 @@ on: jobs: build-push: runs-on: ubuntu-latest - env: - # Gets the tag name and removes the 'v' prefix - VERSION: ${{ github.ref_name#v }} - steps: + - name: Get image version + run: | + echo "image_version=$(echo ${GITHUB_REF##*/v})" >> $GITHUB_ENV + - name: Checkout code uses: actions/checkout@v3 @@ -25,11 +25,11 @@ jobs: run: make build - name: Build Docker Image - run: VERSION=$VERSION make docker + run: VERSION=${{ env.image_version }} make docker - name: Login to ghcr.io # This is where you will update the PAT to GITHUB_TOKEN run: echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u $ --password-stdin - name: Push Docker Image - run: VERSION=$VERSION make docker-push + run: VERSION=${{ env.image_version }} make docker-push