fix: replace echo -e heredoc with brace-block in build-variant tags steps
Validate / docs-check (push) Successful in 13s
Validate / validate-base (push) Successful in 12m21s
Validate / validate-omos (push) Successful in 18m38s
Validate / validate-with-pi (push) Successful in 13m23s
Validate / validate-omos-with-pi (push) Successful in 16m34s

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.
This commit is contained in:
2026-05-10 11:59:04 +02:00
parent a3ff601bf0
commit 7dc836ab66
+28 -20
View File
@@ -355,11 +355,13 @@ jobs:
id: tags id: tags
run: | run: |
VERSION="${{ inputs.release_tag }}" VERSION="${{ inputs.release_tag }}"
TAGS="${IMAGE}:${VERSION}" { echo "tags<<EOF"
if [ "${{ inputs.promote_latest }}" = "true" ]; then echo "${IMAGE}:${VERSION}"
TAGS="${TAGS}\n${IMAGE}:latest" if [ "${{ inputs.promote_latest }}" = "true" ]; then
fi echo "${IMAGE}:latest"
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT" fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v7 - uses: docker/build-push-action@v7
with: with:
context: . context: .
@@ -401,11 +403,13 @@ jobs:
id: tags id: tags
run: | run: |
VERSION="${{ inputs.release_tag }}" VERSION="${{ inputs.release_tag }}"
TAGS="${IMAGE}:${VERSION}-omos" { echo "tags<<EOF"
if [ "${{ inputs.promote_latest }}" = "true" ]; then echo "${IMAGE}:${VERSION}-omos"
TAGS="${TAGS}\n${IMAGE}:latest-omos" if [ "${{ inputs.promote_latest }}" = "true" ]; then
fi echo "${IMAGE}:latest-omos"
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT" fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v7 - uses: docker/build-push-action@v7
with: with:
context: . context: .
@@ -447,11 +451,13 @@ jobs:
id: tags id: tags
run: | run: |
VERSION="${{ inputs.release_tag }}" VERSION="${{ inputs.release_tag }}"
TAGS="${IMAGE}:${VERSION}-with-pi" { echo "tags<<EOF"
if [ "${{ inputs.promote_latest }}" = "true" ]; then echo "${IMAGE}:${VERSION}-with-pi"
TAGS="${TAGS}\n${IMAGE}:latest-with-pi" if [ "${{ inputs.promote_latest }}" = "true" ]; then
fi echo "${IMAGE}:latest-with-pi"
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT" fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v7 - uses: docker/build-push-action@v7
with: with:
context: . context: .
@@ -493,11 +499,13 @@ jobs:
id: tags id: tags
run: | run: |
VERSION="${{ inputs.release_tag }}" VERSION="${{ inputs.release_tag }}"
TAGS="${IMAGE}:${VERSION}-omos-with-pi" { echo "tags<<EOF"
if [ "${{ inputs.promote_latest }}" = "true" ]; then echo "${IMAGE}:${VERSION}-omos-with-pi"
TAGS="${TAGS}\n${IMAGE}:latest-omos-with-pi" if [ "${{ inputs.promote_latest }}" = "true" ]; then
fi echo "${IMAGE}:latest-omos-with-pi"
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT" fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v7 - uses: docker/build-push-action@v7
with: with:
context: . context: .