Skip to content

Commit 7067057

Browse files
committed
ci(build): publish versioned image on semver tag push
Add tag trigger (v*.*.*) and semver image tags so pushing a release tag publishes :0.9.0 and :0.9 alongside the existing :latest from main. Git tags stay v-prefixed; image tags drop the prefix per Docker convention.
1 parent 5e14417 commit 7067057

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build container image
33
on:
44
push:
55
branches: [main]
6+
tags: ["v*.*.*"]
67
pull_request:
78
branches: [main]
89

@@ -37,6 +38,8 @@ jobs:
3738
tags: |
3839
type=raw,value=latest,enable={{is_default_branch}}
3940
type=ref,event=pr,prefix=pr-
41+
type=semver,pattern={{version}}
42+
type=semver,pattern={{major}}.{{minor}}
4043
4144
- name: Build and push
4245
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)