15
15
include :
16
16
- platform : linux/amd64
17
17
runner : ubuntu-latest
18
+ arch : amd64
18
19
- platform : linux/arm64
19
20
runner : ubuntu-24.04-arm64
21
+ arch : arm64
20
22
env :
21
23
LATEST_TAG : ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
22
24
43
45
platforms : ${{ matrix.platform }}
44
46
push : true
45
47
tags : |
46
- ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
47
- ${{ env.LATEST_TAG != '' && format('thirdweb/engine:latest-{0}', matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' ) || '' }}
48
+ ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-${{ matrix.arch }}
49
+ ${{ env.LATEST_TAG != '' && format('thirdweb/engine:latest-{0}', matrix.arch ) || '' }}
48
50
cache-from : type=gha,scope=${{ matrix.platform }}
49
51
cache-to : type=gha,scope=${{ matrix.platform }},mode=max
50
52
build-args : ENGINE_VERSION=${{ github.event.release.tag_name }}
@@ -55,24 +57,33 @@ jobs:
55
57
env :
56
58
LATEST_TAG : ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
57
59
steps :
60
+ - name : Set up Docker Buildx
61
+ uses : docker/setup-buildx-action@v3
62
+
58
63
- name : Login to DockerHub
59
64
uses : docker/login-action@v3
60
65
with :
61
66
username : ${{ secrets.DOCKER_USERNAME }}
62
67
password : ${{ secrets.DOCKER_PASSWORD }}
63
68
64
- - name : Create and Push Multi-arch Manifest (release tag)
69
+ - name : Create and Push Multi-arch Manifest (release tag)
65
70
run : |
66
- docker manifest create ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }} \
71
+ docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }} \
67
72
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-amd64 \
68
73
${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}-arm64
69
- docker manifest push ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}
70
-
74
+
75
+ - name : Inspect release image
76
+ run : |
77
+ docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ github.event.release.tag_name }}
71
78
72
- - name : Create and Push Multi-arch Manifest (latest tag) (if applicable)
79
+ - name : Create and Push Multi-arch Manifest (latest tag) (if applicable)
80
+ if : ${{ env.LATEST_TAG != '' }}
81
+ run : |
82
+ docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:latest \
83
+ ${{ env.REGISTRY_IMAGE }}:latest-amd64 \
84
+ ${{ env.REGISTRY_IMAGE }}:latest-arm64
85
+
86
+ - name : Inspect latest image (if applicable)
73
87
if : ${{ env.LATEST_TAG != '' }}
74
88
run : |
75
- docker manifest create ${{ env.REGISTRY_IMAGE }}:latest \
76
- ${{ env.REGISTRY_IMAGE }}:latest-arm64 \
77
- ${{ env.REGISTRY_IMAGE }}:latest-amd64
78
- docker manifest push ${{ env.REGISTRY_IMAGE }}:latest
89
+ docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
0 commit comments