Skip to content

Commit 5206c74

Browse files
refactor: upgrade Docker build-push action to v6 and improve manifest creation script
1 parent 2213b4c commit 5206c74

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/docker-publish.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
type=raw,value=latest-amd64,enable={{is_default_branch}}
5656
5757
- name: Build and push AMD64 Docker image
58-
uses: docker/build-push-action@v5
58+
uses: docker/build-push-action@v6
5959
with:
6060
context: .
6161
file: ./Dockerfile
@@ -114,7 +114,7 @@ jobs:
114114
type=raw,value=latest-arm64,enable={{is_default_branch}}
115115
116116
- name: Build and push ARM64 Docker image
117-
uses: docker/build-push-action@v5
117+
uses: docker/build-push-action@v6
118118
with:
119119
context: .
120120
file: ./Dockerfile
@@ -181,18 +181,20 @@ jobs:
181181
182182
- name: Create and push Docker Hub manifest
183183
run: |
184-
for tag in ${{ steps.meta-dockerhub.outputs.tags }}; do
184+
echo '${{ steps.meta-dockerhub.outputs.tags }}' | while IFS= read -r tag; do
185+
[ -z "$tag" ] && continue
185186
docker buildx imagetools create \
186-
--tag ${tag} \
187-
${tag}-amd64 \
188-
${tag}-arm64
187+
--tag "${tag}" \
188+
"${tag}-amd64" \
189+
"${tag}-arm64"
189190
done
190191
191192
- name: Create and push GHCR manifest
192193
run: |
193-
for tag in ${{ steps.meta-ghcr.outputs.tags }}; do
194+
echo '${{ steps.meta-ghcr.outputs.tags }}' | while IFS= read -r tag; do
195+
[ -z "$tag" ] && continue
194196
docker buildx imagetools create \
195-
--tag ${tag} \
196-
${tag}-amd64 \
197-
${tag}-arm64
197+
--tag "${tag}" \
198+
"${tag}-amd64" \
199+
"${tag}-arm64"
198200
done

0 commit comments

Comments
 (0)