From a6a08b48f4c3a37b06d55f6066b288850cda7d1f Mon Sep 17 00:00:00 2001 From: Xieql Date: Tue, 31 Oct 2023 14:41:18 +0800 Subject: [PATCH] workflows: update release image script Signed-off-by: Xieql --- .github/workflows/release-image.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-image.yaml b/.github/workflows/release-image.yaml index 7f2adf1ed..382afa57b 100644 --- a/.github/workflows/release-image.yaml +++ b/.github/workflows/release-image.yaml @@ -3,11 +3,14 @@ name: Build and Push Images on: push: tags: - - 'v*.*.*' + - "v*.*.*" jobs: build-push: runs-on: ubuntu-latest + env: + # Gets the tag name and removes the 'v' prefix + VERSION: ${{ github.ref_name#v }} steps: - name: Checkout code @@ -22,13 +25,11 @@ jobs: run: make build - name: Build Docker Image - # Use version tag - run: VERSION=${{ github.ref_name }} make docker + run: VERSION=$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=${{ github.ref_name }} make docker-push - + run: VERSION=$VERSION make docker-push