Skip to content

Commit e610e86

Browse files
committed
Support release tags
1 parent e53873c commit e610e86

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/PublishDockerImage.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Create and publish a Docker image
33
on:
44
push:
55
branches: ['main']
6+
tags:
7+
- 'v*.*.*'
68
pull_request:
79
types: [opened, synchronize, reopened]
810

@@ -34,6 +36,13 @@ jobs:
3436
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3537
with:
3638
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
tags: |
40+
type=ref,event=branch
41+
type=ref,event=pr
42+
type=semver,pattern={{version}}
43+
type=semver,pattern={{major}}.{{minor}}
44+
type=semver,pattern={{major}}
45+
type=sha
3746
3847
- name: Build and push Docker image
3948
id: push
@@ -50,4 +59,3 @@ jobs:
5059
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
5160
subject-digest: ${{ steps.push.outputs.digest }}
5261
push-to-registry: true
53-

0 commit comments

Comments
 (0)