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
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
|
@ -15,10 +15,16 @@ jobs:
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- 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