From 7dc836ab66211eefaa323c352c557114e07f7c2c Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Sun, 10 May 2026 11:59:04 +0200 Subject: [PATCH] fix: replace echo -e heredoc with brace-block in build-variant tags steps echo -e doesn't interpret \n in /bin/sh (dash), which is the default shell in catthehacker/ubuntu:act-latest. This caused steps.tags.outputs.tags to be empty, resulting in 'tag is needed when pushing to registry' from buildx. Also fixes a secondary bug: TAGS='${TAGS}\n...' stored a literal backslash-n rather than a real newline, which would have broken multi-tag output when promote_latest=true. Fix: replace with a brace block using plain echo, which produces actual newlines and works in both sh and bash. --- .gitea/workflows/docker-publish-split.yml | 48 +++++++++++++---------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/docker-publish-split.yml b/.gitea/workflows/docker-publish-split.yml index f2a95dd..3614176 100644 --- a/.gitea/workflows/docker-publish-split.yml +++ b/.gitea/workflows/docker-publish-split.yml @@ -355,11 +355,13 @@ jobs: id: tags run: | VERSION="${{ inputs.release_tag }}" - TAGS="${IMAGE}:${VERSION}" - if [ "${{ inputs.promote_latest }}" = "true" ]; then - TAGS="${TAGS}\n${IMAGE}:latest" - fi - echo -e "tags<> "$GITHUB_OUTPUT" + { echo "tags<> "$GITHUB_OUTPUT" - uses: docker/build-push-action@v7 with: context: . @@ -401,11 +403,13 @@ jobs: id: tags run: | VERSION="${{ inputs.release_tag }}" - TAGS="${IMAGE}:${VERSION}-omos" - if [ "${{ inputs.promote_latest }}" = "true" ]; then - TAGS="${TAGS}\n${IMAGE}:latest-omos" - fi - echo -e "tags<> "$GITHUB_OUTPUT" + { echo "tags<> "$GITHUB_OUTPUT" - uses: docker/build-push-action@v7 with: context: . @@ -447,11 +451,13 @@ jobs: id: tags run: | VERSION="${{ inputs.release_tag }}" - TAGS="${IMAGE}:${VERSION}-with-pi" - if [ "${{ inputs.promote_latest }}" = "true" ]; then - TAGS="${TAGS}\n${IMAGE}:latest-with-pi" - fi - echo -e "tags<> "$GITHUB_OUTPUT" + { echo "tags<> "$GITHUB_OUTPUT" - uses: docker/build-push-action@v7 with: context: . @@ -493,11 +499,13 @@ jobs: id: tags run: | VERSION="${{ inputs.release_tag }}" - TAGS="${IMAGE}:${VERSION}-omos-with-pi" - if [ "${{ inputs.promote_latest }}" = "true" ]; then - TAGS="${TAGS}\n${IMAGE}:latest-omos-with-pi" - fi - echo -e "tags<> "$GITHUB_OUTPUT" + { echo "tags<> "$GITHUB_OUTPUT" - uses: docker/build-push-action@v7 with: context: .