Skip to content

Commit 85802bc

Browse files
author
F嘉阳-coder
committed
fix: handle multiline tags in for loop correctly
1 parent 4437b2b commit 85802bc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/build-and-push.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,12 @@ jobs:
137137
done)
138138
139139
# Create and push manifest with all tags
140-
for tag in ${{ steps.meta.outputs.tags }}; do
140+
tags="${{ steps.meta.outputs.tags }}"
141+
echo "$tags" | while read -r tag; do
141142
docker buildx imagetools create -t "$tag" $digests
142143
done
143144
144145
- name: Inspect image
145146
run: |
146-
TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1 | cut -d':' -f2)
147-
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${TAG}
147+
TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1 | tr -d '\n')
148+
docker buildx imagetools inspect "$TAG"

0 commit comments

Comments
 (0)