gha: add support for docker-v* tags

ci(bin-image): strip prefix for bin-image tags

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-10-15 12:31:05 +02:00
committed by Sebastiaan van Stijn
parent b514589124
commit acfe4e8613
3 changed files with 6 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ on:
- '[0-9]+.x' - '[0-9]+.x'
tags: tags:
- 'v*' - 'v*'
- 'docker-v*'
pull_request: pull_request:
env: env:
@@ -69,11 +70,11 @@ jobs:
## push on 28.x branch ## push on 28.x branch
# moby/moby-bin:28.x # moby/moby-bin:28.x
tags: | tags: |
type=semver,pattern={{version}}
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
type=semver,pattern={{major}} type=semver,pattern={{version}},match=docker-(.*)
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}},match=docker-(.*)
type=semver,pattern={{major}},match=docker-(.*)
- -
name: Rename meta bake definition file name: Rename meta bake definition file
# see https://github.com/docker/metadata-action/issues/381#issuecomment-1918607161 # see https://github.com/docker/metadata-action/issues/381#issuecomment-1918607161

View File

@@ -17,6 +17,7 @@ on:
- '[0-9]+.x' - '[0-9]+.x'
tags: tags:
- 'v*' - 'v*'
- 'docker-v*'
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: ["master"] branches: ["master"]

View File

@@ -40,6 +40,7 @@ DEFAULT_BUNDLES=(
VERSION=${VERSION:-dev} VERSION=${VERSION:-dev}
case "$VERSION" in case "$VERSION" in
refs/tags/docker-v*) VERSION=${VERSION#refs/tags/docker-v} ;;
refs/tags/v*) VERSION=${VERSION#refs/tags/v} ;; refs/tags/v*) VERSION=${VERSION#refs/tags/v} ;;
refs/tags/*) VERSION=${VERSION#refs/tags/} ;; refs/tags/*) VERSION=${VERSION#refs/tags/} ;;
refs/heads/*) VERSION=$(echo "${VERSION#refs/heads/}" | sed -r 's#/+#-#g') ;; refs/heads/*) VERSION=$(echo "${VERSION#refs/heads/}" | sed -r 's#/+#-#g') ;;