Skip to content

Commit d0f6fd4

Browse files
authored
chore: on release publish image with tag (#67)
Signed-off-by: Alexander Matyushentsev <[email protected]>
1 parent 98e9a70 commit d0f6fd4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/docker.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Create and publish a Docker image
22

33
on:
44
push:
5+
branches:
6+
- main
7+
release:
8+
types: [published]
59

610
env:
711
REGISTRY: ghcr.io
@@ -44,6 +48,10 @@ jobs:
4448
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
4549
with:
4650
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
51+
tags: |
52+
type=raw,value=latest,enable=${{ github.event_name == 'push' }}
53+
type=ref,event=tag
54+
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
4755
4856
- name: Set up QEMU
4957
uses: docker/setup-qemu-action@v3
@@ -57,5 +65,3 @@ jobs:
5765
platforms: linux/amd64,linux/arm64
5866
tags: ${{ steps.meta.outputs.tags }}
5967
labels: ${{ steps.meta.outputs.labels }}
60-
61-

0 commit comments

Comments
 (0)