Skip to content

Commit 2d00b8a

Browse files
authored
ci: build and push multi-arch Docker images (amd64, arm64) (#2110)
1 parent 911ace9 commit 2d00b8a

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.github/workflows/integration-tests.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,23 @@ jobs:
4848
username: ${{ secrets.DOCKERHUB_USER }}
4949
password: ${{ secrets.DOCKERHUB_PASS }}
5050

51-
- name: Build Docker image
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
53+
54+
- name: Build and push multi-arch Docker image
5255
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
5356
with:
5457
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
5558
context: .
5659
push: true
60+
platforms: linux/amd64,linux/arm64
5761
tags: |
5862
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
5963
${{ env.IMAGE_NAME }}:latest
6064
build_push_image:
6165
name: Build and Push Docker image to GCP
6266
runs-on: parity-default
63-
timeout-minutes: 30
67+
timeout-minutes: 60
6468
steps:
6569
- name: Check out the repo
6670
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
@@ -84,13 +88,20 @@ jobs:
8488
- name: "Auth in gcloud registry"
8589
run: "gcloud auth configure-docker europe-docker.pkg.dev --quiet"
8690

87-
- name: build
88-
run: |
89-
docker build \
90-
-t ${{ env.IMAGE_NAME }}:${{ env.VERSION }} \
91-
-f ./scripts/ci/docker/zombienet_injected.Dockerfile \
92-
.
93-
docker push "${{ env.IMAGE_NAME }}:${{ env.VERSION }}"
91+
- name: Set up Docker Buildx
92+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
93+
94+
- name: Build and push multi-arch Docker image
95+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
96+
with:
97+
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
98+
context: .
99+
push: true
100+
platforms: linux/amd64,linux/arm64
101+
cache-from: type=gha
102+
cache-to: type=gha,mode=max
103+
tags: |
104+
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
94105
95106
set-variables:
96107
name: Set variables

.github/workflows/release.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,18 @@ jobs:
122122
username: ${{ secrets.DOCKERHUB_USER }}
123123
password: ${{ secrets.DOCKERHUB_PASS }}
124124

125-
- name: Build Docker image
125+
- name: Set up Docker Buildx
126+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
127+
128+
- name: Build and push multi-arch Docker image
126129
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
127130
with:
128131
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
129132
context: .
130133
push: true
134+
platforms: linux/amd64,linux/arm64
135+
cache-from: type=gha
136+
cache-to: type=gha,mode=max
131137
tags: |
132138
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
133139
${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)