Skip to content

Commit b181009

Browse files
committed
Use semver in docker images
1 parent 6902337 commit b181009

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ jobs:
8383
uses: docker/metadata-action@v3
8484
with:
8585
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
86+
tags: |
87+
type=ref,event=branch
88+
type=semver,pattern={{version}}
89+
type=semver,pattern={{major}}
90+
type=semver,pattern={{major}}.{{minor}}
91+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
8692
8793
# Build and push Docker image with Buildx (don't push on PR)
8894
# https://github.com/docker/build-push-action
@@ -133,6 +139,12 @@ jobs:
133139
uses: docker/metadata-action@v3
134140
with:
135141
images: ${{ env.IMAGE_NAME }}
142+
tags: |
143+
type=ref,event=branch
144+
type=semver,pattern={{version}}
145+
type=semver,pattern={{major}}
146+
type=semver,pattern={{major}}.{{minor}}
147+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
136148
137149
# Build and push Docker image with Buildx (don't push on PR)
138150
# https://github.com/docker/build-push-action

0 commit comments

Comments
 (0)