Skip to content

Commit 0ad4e53

Browse files
committed
ci: use semver tags instead of SHA for docker images
Tags on push: :main/:dev/:test (branch), :latest (main only). Tags on v* tag: :0.6.0, :0.6, :latest.
1 parent 8a8b383 commit 0ad4e53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build replicate
33
on:
44
push:
55
branches: [main, dev, test]
6+
tags: ['v*']
67
workflow_dispatch:
78

89
permissions:
@@ -27,7 +28,8 @@ jobs:
2728
images: ghcr.io/hanzoai/replicate
2829
tags: |
2930
type=ref,event=branch
30-
type=sha
31+
type=semver,pattern={{version}}
32+
type=semver,pattern={{major}}.{{minor}}
3133
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
3234
- uses: docker/build-push-action@v6
3335
with:

0 commit comments

Comments
 (0)