Skip to content

Commit 6ea7dc1

Browse files
committed
ci(docker): emit comma-separated image list for buildx 'outputs' name=
The 'outputs: type=image,name=...,push-by-digest=true' field is parsed as CSV by buildx; passing the newline-separated multi-line images.outputs.list broke the parser with 'extraneous or missing " in quoted-field'. Add a 'csv' sibling output that joins ghcr + optional dockerhub names with commas on a single line, and use that in the jammy by-digest build step.
1 parent 82da1f9 commit 6ea7dc1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ jobs:
108108
id: images
109109
run: |
110110
IMAGES="${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.os }}"
111+
CSV="$IMAGES"
111112
if [ -n "${{ secrets.DOCKER_USERNAME }}" ]; then
112113
IMAGES="$IMAGES
113114
${{ secrets.DOCKER_USERNAME }}/yap-${{ matrix.os }}"
115+
CSV="$CSV,${{ secrets.DOCKER_USERNAME }}/yap-${{ matrix.os }}"
114116
fi
115117
{ echo "list<<EOF"; echo "$IMAGES"; echo "EOF"; } >> "$GITHUB_OUTPUT"
118+
echo "csv=$CSV" >> "$GITHUB_OUTPUT"
116119
117120
- name: 📋 Extract metadata
118121
id: meta
@@ -143,7 +146,9 @@ jobs:
143146
platforms: ${{ matrix.platform }}
144147
labels: ${{ steps.meta.outputs.labels }}
145148
# Push each platform by digest; the merge job assembles the manifest.
146-
outputs: type=image,"name=${{ steps.images.outputs.list }}",push-by-digest=true,name-canonical=true,push=true
149+
# IMPORTANT: name= must be a comma-separated list (single line). Using
150+
# the newline-separated images.outputs.list breaks buildx's CSV parser.
151+
outputs: type=image,"name=${{ steps.images.outputs.csv }}",push-by-digest=true,name-canonical=true,push=true
147152
cache-from: type=gha,scope=${{ matrix.os }}-${{ matrix.platform }}
148153
cache-to: type=gha,mode=max,scope=${{ matrix.os }}-${{ matrix.platform }}
149154
build-args: |

0 commit comments

Comments
 (0)