Improve Docker image tags (#337)

This commit is contained in:
Antti 2022-09-09 17:40:27 +03:00 committed by GitHub
parent e8f8317d52
commit bfbebbcd51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -62,10 +62,13 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
# Always tagged as the pushed branch (ex. master)
# For releases: latest, full version and major version (ex. latest, v3.3 and v3)
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}
type=raw,value={{branch}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=match,pattern=v\d+,group=0,enable=${{ startsWith(github.ref, 'refs/tags/') }}
flavor: |
latest=false
- name: Build and push