Skip to content

Commit ad2302f

Browse files
committed
Fix OCI workflow version tagging
1 parent 231a3ca commit ad2302f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/publish-oci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Publish OCI Image
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "OCI version to publish, for example 0.1.1"
8+
required: true
9+
type: string
510
push:
611
tags:
712
- "vector-db-v*"
@@ -20,6 +25,17 @@ jobs:
2025
- name: Checkout repository
2126
uses: actions/checkout@v4
2227

28+
- name: Resolve release version
29+
id: version
30+
shell: bash
31+
run: |
32+
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
33+
VERSION="${{ inputs.version }}"
34+
else
35+
VERSION="${GITHUB_REF_NAME#vector-db-v}"
36+
fi
37+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
38+
2339
- name: Set up QEMU
2440
uses: docker/setup-qemu-action@v3
2541

@@ -39,7 +55,7 @@ jobs:
3955
with:
4056
images: ghcr.io/kroq86/vector-db-mcp
4157
tags: |
42-
type=match,pattern=vector-db-v(.*),group=1
58+
type=raw,value=${{ steps.version.outputs.version }}
4359
type=raw,value=latest,enable={{is_default_branch}}
4460
4561
- name: Build and push image

0 commit comments

Comments
 (0)