Skip to content

Commit 28249ed

Browse files
committed
build: use script action to store proper version tag
1 parent b175dc2 commit 28249ed

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ jobs:
156156
- name: Checkout
157157
uses: actions/checkout@v2
158158

159+
- name: Set Versions
160+
uses: actions/github-script@v6
161+
id: set_version
162+
with:
163+
script: |
164+
const tag = context.ref.substring(10)
165+
const no_v = tag.replace('v', '')
166+
core.setOutput('tag', tag)
167+
core.setOutput('nov', no_v)
168+
159169
- name: Log in to GitHub Container Registry
160170
uses: docker/login-action@v1
161171
with:
@@ -168,5 +178,5 @@ jobs:
168178
with:
169179
push: true
170180
tags: |
171-
ghcr.io/${{ github.repository }}:${{ github.ref }}
181+
ghcr.io/${{ github.repository }}:${{steps.set_version.outputs.nov}}
172182
ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)