Skip to content

Commit a1cd7f4

Browse files
committed
Add multiplatform image build/push
1 parent e21f12d commit a1cd7f4

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/testing-docker-multiplatform-builds.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: Testing docker multiplatform builds
22
run-name: Testing docker multiplatform builds
33

4+
env:
5+
DOCKER_URL: "erigontech/dev-erigon:test-oleksandr"
6+
47
on:
58
workflow_dispatch:
69

710
jobs:
811

9-
build-architecture:
12+
build-archs:
1013
runs-on: ${{ matrix.runner }}
1114
timeout-minutes: 15
1215
strategy:
@@ -40,6 +43,27 @@ jobs:
4043
--attest type=provenance,mode=max \
4144
--push --platform linux/${{ matrix.arch }} \
4245
--progress plain \
43-
-t erigontech/dev-erigon:test-oleksandr-${{ matrix.docker-tag }} -f Dockerfile-mp .
46+
-t ${{ env.DOCKER_URL }}-${{ matrix.docker-tag }} -f Dockerfile-mp .
4447
4548
49+
build-final-image:
50+
runs-on: ubuntu-24.04
51+
timeout-minutes: 10
52+
steps:
53+
54+
- name: Login to Docker Hub
55+
uses: docker/login-action@v3
56+
with:
57+
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
58+
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}
59+
60+
- name: Set up Docker Buildx
61+
uses: docker/setup-buildx-action@v3
62+
63+
- name: Build multiplatform image
64+
run: |
65+
docker manifest create \
66+
${{ env.DOCKER_URL }} \
67+
--amend ${{ env.DOCKER_URL }}-amd64-v2 \
68+
--amend ${{ env.DOCKER_URL }}-arm64
69+
docker manifest push ${{ env.DOCKER_URL }}

0 commit comments

Comments
 (0)