Get tag when it's a version release

This commit is contained in:
Esteban Sánchez 2020-10-24 11:30:51 +02:00
parent b3e5e69f1f
commit 8f0a0381d3

View file

@ -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