Use CLI release tags for Docker image versions

This commit is contained in:
vorotamoroz
2026-10-14 12:22:52 +00:00
parent 2bc4881714
commit 51d16d06c5
4 changed files with 68 additions and 2 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
# Build and push the CLI Docker image to GitHub Container Registry (GHCR).
# Image tag format: <manifest-version>-cli
# Release image tag format: <release-version>-cli
# Example: 1.0.36-cli
#
# Stable releases are also tagged with their major-minor version and 'latest'.
@@ -72,6 +72,15 @@ jobs:
DRY_RUN: ${{ inputs.dry_run }}
run: |
VERSION=$(jq -r '.version' manifest.json)
if [[ "${REF}" == refs/tags/*-cli ]]; then
# CLI releases use their Git tag independently of the plug-in version.
VERSION="${REF#refs/tags/}"
VERSION="${VERSION%-cli}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then
printf 'Invalid CLI release tag: %s\n' "$REF" >&2
exit 1
fi
fi
MAJOR_MINOR=$(echo "${VERSION}" | cut -d. -f1,2)
SHORT_SHA=$(git rev-parse --short HEAD)
IMAGE="ghcr.io/${{ github.repository_owner }}/livesync-cli"