From 28249ede020fad2c8c8e79231fab41b515c700e2 Mon Sep 17 00:00:00 2001 From: Bojan Date: Sun, 6 Mar 2022 20:24:01 -0400 Subject: [PATCH] build: use script action to store proper version tag --- .github/workflows/release.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 17ab40fc..e3534185 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -156,6 +156,16 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set Versions + uses: actions/github-script@v6 + id: set_version + with: + script: | + const tag = context.ref.substring(10) + const no_v = tag.replace('v', '') + core.setOutput('tag', tag) + core.setOutput('nov', no_v) + - name: Log in to GitHub Container Registry uses: docker/login-action@v1 with: @@ -168,5 +178,5 @@ jobs: with: push: true tags: | - ghcr.io/${{ github.repository }}:${{ github.ref }} + ghcr.io/${{ github.repository }}:${{steps.set_version.outputs.nov}} ghcr.io/${{ github.repository }}:latest \ No newline at end of file