17
17
18
18
jobs :
19
19
geth :
20
- runs-on : ubuntu-latest
21
20
strategy :
22
21
matrix :
23
- arch : [linux/amd64]
22
+ settings :
23
+ - arch : linux/amd64
24
+ runs-on : ubuntu-24.04
25
+ - arch : linux/arm64
26
+ runs-on : ubuntu-24.04-arm
27
+ runs-on : ${{ matrix.settings.runs-on }}
24
28
steps :
25
29
- name : Checkout
26
30
uses : actions/checkout@v3
32
36
username : ${{ github.actor }}
33
37
password : ${{ secrets.GITHUB_TOKEN }}
34
38
35
- - name : Set up QEMU
36
- uses : docker/setup-qemu-action@v2
37
- with :
38
- platforms : ${{ matrix.arch }}
39
-
40
39
- name : Extract metadata for the Docker image
41
40
id : meta
42
41
uses : docker/metadata-action@v4
@@ -49,21 +48,45 @@ jobs:
49
48
uses : docker/setup-buildx-action@v3
50
49
51
50
- name : Build and push the Docker image
51
+ id : build
52
52
uses : docker/build-push-action@v6
53
53
with :
54
54
context : .
55
55
file : geth/Dockerfile
56
- push : true
57
- tags : ${{ steps.meta.outputs.tags }}
56
+ tags : ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }},${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}
58
57
labels : ${{ steps.meta.outputs.labels }}
59
- platforms : ${{ matrix.arch }}
58
+ platforms : ${{ matrix.settings.arch }}
59
+ outputs : type=image,push-by-digest=true,name-canonical=true,push=true
60
+
61
+ - name : Export digest
62
+ run : |
63
+ mkdir -p ${{ runner.temp }}/digests
64
+ digest="${{ steps.build.outputs.digest }}"
65
+ touch "${{ runner.temp }}/digests/${digest#sha256:}"
66
+
67
+ - name : Prepare
68
+ run : |
69
+ platform=${{ matrix.settings.arch }}
70
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
71
+
72
+ - name : Upload digest
73
+ uses : actions/upload-artifact@v4
74
+ with :
75
+ name : digests-geth-${{ env.PLATFORM_PAIR }}
76
+ path : ${{ runner.temp }}/digests/*
77
+ if-no-files-found : error
78
+ retention-days : 1
60
79
reth :
61
- runs-on : ubuntu-latest
62
80
strategy :
63
81
matrix :
64
- include :
82
+ settings :
65
83
- arch : linux/amd64
84
+ runs-on : ubuntu-24.04
66
85
features : jemalloc,asm-keccak,optimism
86
+ - arch : linux/arm64
87
+ runs-on : ubuntu-24.04-arm
88
+ features : jemalloc,optimism
89
+ runs-on : ${{ matrix.settings.runs-on }}
67
90
steps :
68
91
- name : Checkout
69
92
uses : actions/checkout@v2
@@ -86,21 +109,46 @@ jobs:
86
109
uses : docker/setup-buildx-action@v3
87
110
88
111
- name : Build and push the Docker image
112
+ id : build
89
113
uses : docker/build-push-action@v6
90
114
with :
91
115
context : .
92
116
file : reth/Dockerfile
93
- push : true
94
- tags : ${{ steps.meta.outputs.tags }}
117
+ tags : ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}
95
118
labels : ${{ steps.meta.outputs.labels }}
96
119
build-args : |
97
- FEATURES=${{ matrix.features }}
98
- platforms : ${{ matrix.arch }}
120
+ FEATURES=${{ matrix.settings.features }}
121
+ platforms : ${{ matrix.settings.arch }}
122
+ outputs : type=image,push-by-digest=true,name-canonical=true,push=true
123
+
124
+ - name : Export digest
125
+ run : |
126
+ mkdir -p ${{ runner.temp }}/digests
127
+ digest="${{ steps.build.outputs.digest }}"
128
+ touch "${{ runner.temp }}/digests/${digest#sha256:}"
129
+
130
+ - name : Prepare
131
+ run : |
132
+ platform=${{ matrix.settings.arch }}
133
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
134
+
135
+ - name : Upload digest
136
+ uses : actions/upload-artifact@v4
137
+ with :
138
+ name : digests-reth-${{ env.PLATFORM_PAIR }}
139
+ path : ${{ runner.temp }}/digests/*
140
+ if-no-files-found : error
141
+ retention-days : 1
142
+
99
143
nethermind :
100
- runs-on : ubuntu-latest
101
144
strategy :
102
145
matrix :
103
- platform : [linux/amd64]
146
+ settings :
147
+ - arch : linux/amd64
148
+ runs-on : ubuntu-24.04
149
+ - arch : linux/arm64
150
+ runs-on : ubuntu-24.04-arm
151
+ runs-on : ${{ matrix.settings.runs-on }}
104
152
steps :
105
153
- name : Checkout
106
154
uses : actions/checkout@v2
@@ -112,11 +160,6 @@ jobs:
112
160
username : ${{ github.actor }}
113
161
password : ${{ secrets.GITHUB_TOKEN }}
114
162
115
- - name : Set up QEMU
116
- uses : docker/setup-qemu-action@v2
117
- with :
118
- platforms : ${{ matrix.arch }}
119
-
120
163
- name : Set up Docker Buildx
121
164
uses : docker/setup-buildx-action@v3
122
165
@@ -128,11 +171,153 @@ jobs:
128
171
${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}
129
172
130
173
- name : Build and push the Docker image
174
+ id : build
131
175
uses : docker/build-push-action@v6
132
176
with :
133
177
context : .
134
178
file : nethermind/Dockerfile
135
- push : true
136
- tags : ${{ steps.meta.outputs.tags }}
179
+ tags : ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}
137
180
labels : ${{ steps.meta.outputs.labels }}
138
- platforms : ${{ matrix.arch }}
181
+ platforms : ${{ matrix.settings.arch }}
182
+ outputs : type=image,push-by-digest=true,name-canonical=true,push=true
183
+
184
+ - name : Export digest
185
+ run : |
186
+ mkdir -p ${{ runner.temp }}/digests
187
+ digest="${{ steps.build.outputs.digest }}"
188
+ touch "${{ runner.temp }}/digests/${digest#sha256:}"
189
+
190
+ - name : Prepare
191
+ run : |
192
+ platform=${{ matrix.settings.arch }}
193
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
194
+
195
+ - name : Upload digest
196
+ uses : actions/upload-artifact@v4
197
+ with :
198
+ name : digests-nethermind-${{ env.PLATFORM_PAIR }}
199
+ path : ${{ runner.temp }}/digests/*
200
+ if-no-files-found : error
201
+ retention-days : 1
202
+
203
+
204
+ merge-geth :
205
+ runs-on : ubuntu-latest
206
+ needs :
207
+ - geth
208
+ steps :
209
+ - name : Download digests
210
+ uses : actions/download-artifact@v4
211
+ with :
212
+ path : ${{ runner.temp }}/digests
213
+ pattern : digests-geth-*
214
+ merge-multiple : true
215
+
216
+ - name : Log into the Container registry
217
+ uses : docker/login-action@v3
218
+ with :
219
+ registry : ${{ env.REGISTRY }}
220
+ username : ${{ github.actor }}
221
+ password : ${{ secrets.GITHUB_TOKEN }}
222
+
223
+ - name : Set up Docker Buildx
224
+ uses : docker/setup-buildx-action@v3
225
+
226
+ - name : Extract metadata for the Docker image
227
+ id : meta
228
+ uses : docker/metadata-action@v5
229
+ with :
230
+ images : |
231
+ ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}
232
+ ${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}
233
+
234
+ - name : Create manifest list and push
235
+ working-directory : ${{ runner.temp }}/digests
236
+ run : |
237
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
238
+ $(printf '${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}@sha256:%s ' *)
239
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
240
+ $(printf '${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}@sha256:%s ' *)
241
+
242
+ - name : Inspect image
243
+ run : |
244
+ docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
245
+ docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
246
+
247
+ merge-reth :
248
+ runs-on : ubuntu-latest
249
+ needs :
250
+ - reth
251
+ steps :
252
+ - name : Download digests
253
+ uses : actions/download-artifact@v4
254
+ with :
255
+ path : ${{ runner.temp }}/digests
256
+ pattern : digests-reth-*
257
+ merge-multiple : true
258
+
259
+ - name : Log into the Container registry
260
+ uses : docker/login-action@v3
261
+ with :
262
+ registry : ${{ env.REGISTRY }}
263
+ username : ${{ github.actor }}
264
+ password : ${{ secrets.GITHUB_TOKEN }}
265
+
266
+ - name : Set up Docker Buildx
267
+ uses : docker/setup-buildx-action@v3
268
+
269
+ - name : Extract metadata for the Docker image
270
+ id : meta
271
+ uses : docker/metadata-action@v5
272
+ with :
273
+ images : |
274
+ ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}
275
+
276
+ - name : Create manifest list and push
277
+ working-directory : ${{ runner.temp }}/digests
278
+ run : |
279
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
280
+ $(printf '${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}@sha256:%s ' *)
281
+
282
+ - name : Inspect image
283
+ run : |
284
+ docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
285
+
286
+ merge-nethermind :
287
+ runs-on : ubuntu-latest
288
+ needs :
289
+ - nethermind
290
+ steps :
291
+ - name : Download digests
292
+ uses : actions/download-artifact@v4
293
+ with :
294
+ path : ${{ runner.temp }}/digests
295
+ pattern : digests-nethermind-*
296
+ merge-multiple : true
297
+
298
+ - name : Log into the Container registry
299
+ uses : docker/login-action@v3
300
+ with :
301
+ registry : ${{ env.REGISTRY }}
302
+ username : ${{ github.actor }}
303
+ password : ${{ secrets.GITHUB_TOKEN }}
304
+
305
+ - name : Set up Docker Buildx
306
+ uses : docker/setup-buildx-action@v3
307
+
308
+ - name : Extract metadata for the Docker image
309
+ id : meta
310
+ uses : docker/metadata-action@v5
311
+ with :
312
+ images : |
313
+ ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}
314
+
315
+ - name : Create manifest list and push
316
+ working-directory : ${{ runner.temp }}/digests
317
+ run : |
318
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
319
+ $(printf '${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}@sha256:%s ' *)
320
+
321
+ - name : Inspect image
322
+ run : |
323
+ docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
0 commit comments