Skip to content

Commit 6c1d2d4

Browse files
committed
Add latest tag
1 parent 0221f37 commit 6c1d2d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ jobs:
6161
# https://github.com/docker/metadata-action
6262
- name: Extract Docker metadata
6363
id: meta
64-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
64+
uses: docker/metadata-action@v5
6565
with:
6666
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
67+
tags: |
68+
type=raw,value=latest,enable={{is_default_branch}}
6769
6870
# Build and push Docker image with Buildx (don't push on PR)
6971
# https://github.com/docker/build-push-action
@@ -73,9 +75,7 @@ jobs:
7375
with:
7476
context: .
7577
push: ${{ github.event_name != 'pull_request' }}
76-
tags: |
77-
${{ steps.meta.outputs.tags }}
78-
${{ github.ref == 'refs/heads/master' && env.REGISTRY }}/{{ env.IMAGE_NAME }}:latest
78+
tags: ${{ steps.meta.outputs.tags }}
7979
labels: ${{ steps.meta.outputs.labels }}
8080
cache-from: type=gha
8181
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)