Skip to content

Commit 98788d1

Browse files
committed
fix: restrict Docker latest tag to releases only
- Latest tag now only applied on git tag releases (refs/tags/v*) - Removes latest tag from main branch pushes to prevent confusion - Semantic version tags also restricted to releases only - Main tag still available for both releases and main branch pushes This ensures the latest tag always points to the most recent stable release rather than development commits on main branch.
1 parent 22ce2a1 commit 98788d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/docker-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ jobs:
8181
${{ env.REGISTRY_IMAGE }}
8282
${{ env.GITHUB_IMAGE }}
8383
tags: |
84-
# Latest tag - for git tags (semantic versions) AND main branch pushes
85-
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
84+
# Latest tag - ONLY for git tags (semantic versions/releases)
85+
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
8686
# Main tag - for git tags (semantic versions) AND main branch pushes
8787
type=raw,value=main,enable=${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
88-
# Semantic version tag - for git tags AND main branch pushes (using latest tag)
89-
type=raw,value=${{ steps.version.outputs.version }},enable=${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
88+
# Semantic version tag - ONLY for git tags (releases)
89+
type=raw,value=${{ steps.version.outputs.version }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
9090
# Develop branch tag
9191
type=raw,value=develop,enable=${{ github.ref == 'refs/heads/develop' }}
9292
# PR tags

0 commit comments

Comments
 (0)