Skip to content

Commit 4066c84

Browse files
authored
Merge pull request AnalogJ#771 from RoboMagus/docker_semver_tags
Add docker semver tags
2 parents 4a72c9e + ea9799d commit 4066c84

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/docker-build.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
latest=false
4747
tags: |
4848
type=ref,enable=true,event=branch,suffix=-collector
49-
type=ref,enable=true,event=tag,suffix=-collector
49+
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},suffix=-collector
50+
type=semver,pattern=v{{major}}.{{minor}},suffix=-collector
51+
type=semver,pattern=v{{major}},suffix=-collector
5052
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5153

5254
# Build and push Docker image with Buildx (don't push on PR)
@@ -99,7 +101,9 @@ jobs:
99101
latest=false
100102
tags: |
101103
type=ref,enable=true,event=branch,suffix=-web
102-
type=ref,enable=true,event=tag,suffix=-web
104+
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},suffix=-web
105+
type=semver,pattern=v{{major}}.{{minor}},suffix=-web
106+
type=semver,pattern=v{{major}},suffix=-web
103107
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
104108
# Build and push Docker image with Buildx (don't push on PR)
105109
# https://github.com/docker/build-push-action
@@ -148,7 +152,9 @@ jobs:
148152
with:
149153
tags: |
150154
type=ref,enable=true,event=branch,suffix=-omnibus
151-
type=ref,enable=true,event=tag,suffix=-omnibus
155+
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},suffix=-omnibus
156+
type=semver,pattern=v{{major}}.{{minor}},suffix=-omnibus
157+
type=semver,pattern=v{{major}},suffix=-omnibus
152158
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
153159
# Build and push Docker image with Buildx (don't push on PR)
154160
# https://github.com/docker/build-push-action

0 commit comments

Comments
 (0)