Browse code

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>

Paweł Gronowski authored on 2025/10/15 19:31:05
Showing 3 changed files
... ...
@@ -22,6 +22,7 @@ on:
22 22
       - '[0-9]+.x'
23 23
     tags:
24 24
       - 'v*'
25
+      - 'docker-v*'
25 26
   pull_request:
26 27
 
27 28
 env:
... ...
@@ -69,11 +70,11 @@ jobs:
69 69
           ## push on 28.x branch
70 70
           # moby/moby-bin:28.x
71 71
           tags: |
72
-            type=semver,pattern={{version}}
73 72
             type=ref,event=branch
74 73
             type=ref,event=pr
75
-            type=semver,pattern={{major}}
76
-            type=semver,pattern={{major}}.{{minor}}
74
+            type=semver,pattern={{version}},match=docker-(.*)
75
+            type=semver,pattern={{major}}.{{minor}},match=docker-(.*)
76
+            type=semver,pattern={{major}},match=docker-(.*)
77 77
       -
78 78
         name: Rename meta bake definition file
79 79
         # see https://github.com/docker/metadata-action/issues/381#issuecomment-1918607161
... ...
@@ -17,6 +17,7 @@ on:
17 17
       - '[0-9]+.x'
18 18
     tags:
19 19
       - 'v*'
20
+      - 'docker-v*'
20 21
   pull_request:
21 22
     # The branches below must be a subset of the branches above
22 23
     branches: ["master"]
... ...
@@ -40,6 +40,7 @@ DEFAULT_BUNDLES=(
40 40
 
41 41
 VERSION=${VERSION:-dev}
42 42
 case "$VERSION" in
43
+	refs/tags/docker-v*) VERSION=${VERSION#refs/tags/docker-v} ;;
43 44
 	refs/tags/v*) VERSION=${VERSION#refs/tags/v} ;;
44 45
 	refs/tags/*) VERSION=${VERSION#refs/tags/} ;;
45 46
 	refs/heads/*) VERSION=$(echo "${VERSION#refs/heads/}" | sed -r 's#/+#-#g') ;;