Get tag when it's a version release
This commit is contained in:
parent
b3e5e69f1f
commit
8f0a0381d3
1 changed files with 8 additions and 2 deletions
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
|
@ -18,7 +18,13 @@ jobs:
|
||||||
|
|
||||||
- name: Extract branch name
|
- name: Extract branch name
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
run: |
|
||||||
|
tag=${GITHUB_REF#refs/tags/}
|
||||||
|
tag=${tag#refs/heads/}
|
||||||
|
if echo $tag | grep -q -E "[0-9]+\.[0-9]+\.[0-9]+"; then
|
||||||
|
tag="v$tag"
|
||||||
|
fi
|
||||||
|
echo "##[set-output name=tag;]$tag"
|
||||||
id: extract_branch
|
id: extract_branch
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
|
Loading…
Reference in a new issue