Skip to content

Commit 76919e7

Browse files
committed
style(ci): use variant-prefixed docker tags instead of variant-suffixed
1 parent 0385eda commit 76919e7

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/docker.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -342,32 +342,32 @@ jobs:
342342
prefix=
343343
suffix=
344344
tags: |
345-
# Branch builds (non-tag pushes) - variant-suffixed branch tag
346-
type=ref,enable=${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }},priority=600,prefix=,suffix=-${{ matrix.variant }},event=branch
347-
# Main/master branch - variant-suffixed tag
348-
type=raw,enable=${{ contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) && github.event_name != 'schedule' }},priority=200,prefix=,suffix=-${{ matrix.variant }},value=latest
345+
# Branch builds (non-tag pushes) - variant-prefixed branch tag
346+
type=ref,enable=${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }},priority=600,prefix=${{ matrix.variant }}-,suffix=,event=branch
347+
# Main/master branch - variant-prefixed tag
348+
type=raw,enable=${{ contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) && github.event_name != 'schedule' }},priority=200,prefix=${{ matrix.variant }}-,suffix=,value=latest
349349
# Main/master branch - global latest tag (only for is_latest variant, no suffix)
350350
type=raw,enable=${{ matrix.is_latest && contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=latest
351-
# Tag builds - variant-suffixed tag
352-
type=raw,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=200,prefix=,suffix=-${{ matrix.variant }},value=latest
351+
# Tag builds - variant-prefixed tag
352+
type=raw,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=200,prefix=${{ matrix.variant }}-,suffix=,value=latest
353353
# Tag builds - global latest tag (only for is_latest variant, no suffix)
354354
type=raw,enable=${{ matrix.is_latest && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=200,prefix=,suffix=,value=latest
355-
# Nightly builds - variant-suffixed
356-
type=schedule,enable=true,priority=1000,prefix=,suffix=-${{ matrix.variant }},pattern=nightly
355+
# Nightly builds - variant-prefixed
356+
type=schedule,enable=true,priority=1000,prefix=${{ matrix.variant }}-,suffix=,pattern=nightly
357357
# Nightly builds - global nightly tag (only for is_latest variant, no suffix)
358358
type=schedule,enable=${{ matrix.is_latest }},priority=1000,prefix=,suffix=,pattern=nightly
359-
# Date-based tags for traceability (YYYYMMDD) - variant-suffixed
360-
type=schedule,enable=true,priority=900,prefix=,suffix=-${{ matrix.variant }},pattern={{date 'YYYYMMDD'}}
359+
# Date-based tags for traceability (YYYYMMDD) - variant-prefixed
360+
type=schedule,enable=true,priority=900,prefix=${{ matrix.variant }}-,suffix=,pattern={{date 'YYYYMMDD'}}
361361
# Date-based tags - global tag (only for is_latest variant, no suffix)
362362
type=schedule,enable=${{ matrix.is_latest }},priority=900,prefix=,suffix=,pattern={{date 'YYYYMMDD'}}
363-
# Semantic version tags from Release Please (variant-x.y.z) - variant-suffixed
364-
type=match,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=-${{ matrix.variant }},pattern=${{ matrix.variant }}-v?(\d+\.\d+\.\d+),group=1
363+
# Semantic version tags from Release Please (variant-x.y.z) - variant-prefixed
364+
type=match,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=${{ matrix.variant }}-,suffix=,pattern=${{ matrix.variant }}-v?(\d+\.\d+\.\d+),group=1
365365
type=match,enable=${{ matrix.is_latest && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=,pattern=${{ matrix.variant }}-v?(\d+\.\d+\.\d+),group=1
366366
# Semantic version tags (x.y)
367-
type=match,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=-${{ matrix.variant }},pattern=${{ matrix.variant }}-v?(\d+\.\d+),group=1
367+
type=match,enable=${{ startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=${{ matrix.variant }}-,suffix=,pattern=${{ matrix.variant }}-v?(\d+\.\d+),group=1
368368
type=match,enable=${{ matrix.is_latest && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=,pattern=${{ matrix.variant }}-v?(\d+\.\d+),group=1
369369
# Semantic version tags (x)
370-
type=match,enable=${{ !contains(github.ref, '-v0.') && !contains(github.ref, '-0.') && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=-${{ matrix.variant }},pattern=${{ matrix.variant }}-v?(\d+),group=1
370+
type=match,enable=${{ !contains(github.ref, '-v0.') && !contains(github.ref, '-0.') && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=${{ matrix.variant }}-,suffix=,pattern=${{ matrix.variant }}-v?(\d+),group=1
371371
type=match,enable=${{ matrix.is_latest && !contains(github.ref, '-v0.') && !contains(github.ref, '-0.') && startsWith(github.ref, format('refs/tags/{0}-', matrix.variant)) }},priority=800,prefix=,suffix=,pattern=${{ matrix.variant }}-v?(\d+),group=1
372372
env:
373373
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

0 commit comments

Comments
 (0)