From ff694b00557863a74efe4abdb410ce84cd431d0d Mon Sep 17 00:00:00 2001 From: Steve Degosserie <723552+stiiifff@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:52:27 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=94=A7=20Fix=20Docker=20release=20?= =?UTF-8?q?extract=20tag=20logic=20(#236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/task-docker-release.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/task-docker-release.yml b/.github/workflows/task-docker-release.yml index e9657fb5..3ee6bdf2 100644 --- a/.github/workflows/task-docker-release.yml +++ b/.github/workflows/task-docker-release.yml @@ -91,11 +91,19 @@ jobs: - name: Extract tag for job output id: extract_tag run: | - if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - FULL_TAG=$(echo '${{ steps.meta-dispatch.outputs.json }}' | jq -r '.tags[-1]') + # Get the JSON output from whichever meta step ran + META_DISPATCH='${{ steps.meta-dispatch.outputs.json }}' + META_CI='${{ steps.meta-ci.outputs.json }}' + + if [ -n "$META_DISPATCH" ]; then + FULL_TAG=$(echo "$META_DISPATCH" | jq -r '.tags[-1]') + elif [ -n "$META_CI" ]; then + FULL_TAG=$(echo "$META_CI" | jq -r '.tags[-1]') else - FULL_TAG=$(echo '${{ steps.meta-ci.outputs.json }}' | jq -r '.tags[-1]') + echo "ERROR: No meta output found!" + exit 1 fi + TAG_ONLY=$(echo "$FULL_TAG" | sed 's|.*:||') echo "image-tag=$TAG_ONLY" >> $GITHUB_OUTPUT echo "image-name=datahavenxyz/datahaven:$TAG_ONLY" >> $GITHUB_OUTPUT