@@ -193,6 +193,7 @@ jobs:
193
193
- name : Setup Docker Buildx
194
194
uses : docker/setup-buildx-action@v3
195
195
- name : Login to DockerHub
196
+ if : ${{ github.repository_owner == 'rust-cross' }}
196
197
uses : docker/login-action@v3
197
198
with :
198
199
username : ${{ secrets.DOCKER_USERNAME }}
@@ -251,6 +252,30 @@ jobs:
251
252
252
253
cat ghcr-manifest.yaml
253
254
./manifest-tool push from-spec ghcr-manifest.yaml
255
+
256
+ if [ "${{ matrix.platform.arch }}" != "armv7l" ]; then
257
+ exit 0
258
+ fi
259
+
260
+ echo "image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:armv7
261
+ manifests:" > ghcr-manifest-armv7.yaml
262
+
263
+ if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64 > /dev/null; then
264
+ echo " - image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64
265
+ platform:
266
+ architecture: amd64
267
+ os: linux" >> ghcr-manifest-armv7.yaml
268
+ fi
269
+
270
+ if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64 > /dev/null; then
271
+ echo " - image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64
272
+ platform:
273
+ architecture: arm64
274
+ os: linux" >> ghcr-manifest-armv7.yaml
275
+ fi
276
+
277
+ cat ghcr-manifest-armv7.yaml
278
+ ./manifest-tool push from-spec ghcr-manifest-armv7.yaml
254
279
- name : Sync images to Docker Hub
255
280
if : ${{ github.repository_owner == 'rust-cross' }}
256
281
env :
@@ -278,52 +303,30 @@ jobs:
278
303
279
304
cat dockerhub-manifest.yaml
280
305
./manifest-tool push from-spec dockerhub-manifest.yaml
281
- - name : Alias armv7l to armv7
282
- if : matrix.platform.arch == 'armv7l'
283
- env :
284
- DOCKER_CLI_EXPERIMENTAL : enabled
285
- run : |
286
- set -e
287
-
288
- echo "image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:armv7
289
- manifests:" > ghcr-manifest.yaml
290
306
291
- if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64 > /dev/null; then
292
- echo " - image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64
293
- platform:
294
- architecture: amd64
295
- os: linux" >> ghcr-manifest.yaml
307
+ if [ "${{ matrix.platform.arch }}" != "armv7l" ]; then
308
+ exit 0
296
309
fi
297
-
298
- if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64 > /dev/null; then
299
- echo " - image: ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64
300
- platform:
301
- architecture: arm64
302
- os: linux" >> ghcr-manifest.yaml
303
- fi
304
-
305
- cat ghcr-manifest.yaml
306
- ./manifest-tool push from-spec ghcr-manifest.yaml
307
-
310
+
308
311
echo "image: ${{ secrets.DOCKER_USERNAME }}/${{ matrix.platform.manylinux }}-cross:armv7
309
- manifests:" > dockerhub-manifest.yaml
312
+ manifests:" > dockerhub-manifest-armv7l .yaml
310
313
311
314
if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64 > /dev/null; then
312
315
echo " - image: ${{ secrets.DOCKER_USERNAME }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-amd64
313
316
platform:
314
317
architecture: amd64
315
- os: linux" >> dockerhub-manifest.yaml
318
+ os: linux" >> dockerhub-manifest-armv7l .yaml
316
319
fi
317
320
318
321
if docker manifest inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64 > /dev/null; then
319
322
echo " - image: ${{ secrets.DOCKER_USERNAME }}/${{ matrix.platform.manylinux }}-cross:${{ matrix.platform.arch }}-arm64
320
323
platform:
321
324
architecture: arm64
322
- os: linux" >> dockerhub-manifest.yaml
325
+ os: linux" >> dockerhub-manifest-armv7l .yaml
323
326
fi
324
327
325
- cat dockerhub-manifest.yaml
326
- ./manifest-tool push from-spec dockerhub-manifest.yaml
328
+ cat dockerhub-manifest-armv7l .yaml
329
+ ./manifest-tool push from-spec dockerhub-manifest-armv7l .yaml
327
330
328
331
conclusion :
329
332
needs : [setup, build]
0 commit comments