Skip to content

Commit 1438046

Browse files
authored
Updated release workflow to use imagetools so that all platforms have release tags added (#19)
1 parent 885caf7 commit 1438046

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,12 @@ jobs:
6363
- name: Re-tag Existing Image
6464
if: steps.check_image.outputs.image_exists == 'true'
6565
run: |
66-
echo "Re-tagging existing image..."
66+
echo "Re-tagging existing multi-platform image..."
6767
68-
# Pull the existing image
69-
docker pull ghcr.io/zozman/stream-webpage-container:sha-${{ github.sha }}
70-
71-
# Tag with latest and version
72-
docker tag ghcr.io/zozman/stream-webpage-container:sha-${{ github.sha }} ghcr.io/zozman/stream-webpage-container:latest
73-
docker tag ghcr.io/zozman/stream-webpage-container:sha-${{ github.sha }} ghcr.io/zozman/stream-webpage-container:${{ github.ref_name }}
74-
75-
# Push the new tags
76-
docker push ghcr.io/zozman/stream-webpage-container:latest
77-
docker push ghcr.io/zozman/stream-webpage-container:${{ github.ref_name }}
68+
# Use buildx imagetools to create new tags that reference the same multi-platform manifest
69+
# This preserves both amd64 and arm64 platforms
70+
docker buildx imagetools create --tag ghcr.io/zozman/stream-webpage-container:latest ghcr.io/zozman/stream-webpage-container:sha-${{ github.sha }}
71+
docker buildx imagetools create --tag ghcr.io/zozman/stream-webpage-container:${{ github.ref_name }} ghcr.io/zozman/stream-webpage-container:sha-${{ github.sha }}
7872
7973
- name: Generate Docker Metadata For New Build
8074
if: steps.check_image.outputs.image_exists == 'false'

0 commit comments

Comments
 (0)