From 576140befb5e77a8a6252762a8acd2d5dceaab0a Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 20 Apr 2026 08:57:02 -0700 Subject: [PATCH] fix: extract openclaw image tag from imageTag attribute instead of store path The sed pattern on the store path basename gave 'tar.gz' because buildLayeredImage outputs 'openclaw.tar.gz'. Use imageTag attribute which returns the actual tag (e.g., '2026.4.14'). --- .gitea/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c7372fc..62f8068 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -129,10 +129,13 @@ jobs: - name: Generate image tag id: meta run: | - # Read the version from the nix definition - IMAGE_TAG=$(nix eval .#openclaw-image.outPath --raw 2>/dev/null | xargs basename | sed 's/.*-//') + # Read the image tag from the nix definition's tag attribute + # buildLayeredImage sets tag from openclawImageTag in default.nix + IMAGE_TAG=$(nix eval .#packages.x86_64-linux.openclaw-image.imageTag --raw 2>/dev/null || \ + nix eval .#openclaw-image.imageTag --raw 2>/dev/null || \ + nix eval .#openclaw-image.outPath --raw 2>/dev/null | xargs basename | sed 's/.*-//') # Fallback to short SHA if tag extraction fails - if [ -z "$IMAGE_TAG" ]; then + if [ -z "$IMAGE_TAG" ] || [ "$IMAGE_TAG" = "tar.gz" ]; then IMAGE_TAG=$(echo "${{ github.sha }}" | cut -c1-7) fi echo "tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT