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
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:
@@ -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"
|
||||||
|
echo "${IMAGE}:${VERSION}"
|
||||||
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
||||||
TAGS="${TAGS}\n${IMAGE}:latest"
|
echo "${IMAGE}:latest"
|
||||||
fi
|
fi
|
||||||
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT"
|
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"
|
||||||
|
echo "${IMAGE}:${VERSION}-omos"
|
||||||
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
||||||
TAGS="${TAGS}\n${IMAGE}:latest-omos"
|
echo "${IMAGE}:latest-omos"
|
||||||
fi
|
fi
|
||||||
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT"
|
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"
|
||||||
|
echo "${IMAGE}:${VERSION}-with-pi"
|
||||||
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
||||||
TAGS="${TAGS}\n${IMAGE}:latest-with-pi"
|
echo "${IMAGE}:latest-with-pi"
|
||||||
fi
|
fi
|
||||||
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT"
|
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"
|
||||||
|
echo "${IMAGE}:${VERSION}-omos-with-pi"
|
||||||
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
if [ "${{ inputs.promote_latest }}" = "true" ]; then
|
||||||
TAGS="${TAGS}\n${IMAGE}:latest-omos-with-pi"
|
echo "${IMAGE}:latest-omos-with-pi"
|
||||||
fi
|
fi
|
||||||
echo -e "tags<<EOF\n${TAGS}\nEOF" >> "$GITHUB_OUTPUT"
|
echo "EOF"
|
||||||
|
} >> "$GITHUB_OUTPUT"
|
||||||
- uses: docker/build-push-action@v7
|
- uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
Reference in New Issue
Block a user