fix: docker image shouldn't be tagged "latest" if it's a beta
Massimo Melina committed
Mar 19, 2026 at 11:03 UTC
d68d7b309ea86b8cf2d61cef637162a03fe2457f
1 file changed
+4
-1
.github/workflows/docker-image.yml
+4
-1
@@ -50,7 +50,10 @@ jobs:
50
docker.io/rejetto/hfs
51
tags: |
52
type=ref,event=tag
53
- type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
53
+ # workflow_dispatch does not expose a tag ref, so channel tags must be derived from inputs.version
54
+ type=raw,value=${{ inputs.version }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.version != '' }}
55
+ type=raw,value=latest,enable=${{ (github.ref_type == 'tag' && !contains(github.ref_name, '-')) || (github.event_name == 'workflow_dispatch' && inputs.version != '' && !contains(inputs.version, '-')) }}
56
+ type=raw,value=beta,enable=${{ (github.ref_type == 'tag' && contains(github.ref_name, '-')) || (github.event_name == 'workflow_dispatch' && inputs.version != '' && contains(inputs.version, '-')) }}
57
type=sha
58
59
- name: Build and push