Add semantic versioning for the docker images (#215)

For every push of a tag, create an image with the same tag.
This was also mentioned in [Semantic versioning for the docker container
#68

](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/68)

---------

Co-authored-by: CaliBrain <calibrain@l4n.xyz>
This commit is contained in:
na
2025-08-18 11:49:10 -04:00
committed by GitHub
co-authored by CaliBrain
parent 5cf070a22d
commit bdc36af9a9
@@ -2,7 +2,13 @@ name: Create and publish Docker images
on:
push:
branches: ['main']
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'
workflow_dispatch:
env:
@@ -38,7 +44,8 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value={{commit_date 'YYYYMMDD'}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=ref,event=branch
type=ref,event=tag
@@ -74,7 +81,8 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-tor
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value={{commit_date 'YYYYMMDD'}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=ref,event=branch
type=ref,event=tag