Skip to content

Commit 50ae0f7

Browse files
authored
[Chore] Update build-push-action to latest v6 (#403)
* Update build-push-action to latest v6 * Setup QEMU * Update on PR * Add QEMU on PR as well * remove -static * Install build-essential * Add back static linking
1 parent de96297 commit 50ae0f7

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

.github/workflows/docker.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Tag Docker image
33
on:
44
push:
55
branches:
6-
- 'main'
6+
- "main"
77
tags:
8-
- 'v*'
8+
- "v*"
99

1010
env:
1111
REGISTRY: ghcr.io
@@ -29,6 +29,11 @@ jobs:
2929
username: ${{ github.actor }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v2
34+
with:
35+
platforms: linux/amd64,linux/arm64
36+
3237
- name: Extract metadata for the Docker image
3338
id: meta
3439
uses: docker/metadata-action@v4
@@ -41,7 +46,7 @@ jobs:
4146
uses: docker/setup-buildx-action@v3
4247

4348
- name: Build and push the Docker image
44-
uses: docker/build-push-action@v4
49+
uses: docker/build-push-action@v6
4550
with:
4651
context: .
4752
file: geth/Dockerfile
@@ -78,7 +83,7 @@ jobs:
7883
uses: docker/setup-buildx-action@v3
7984

8085
- name: Build and push the Docker image
81-
uses: docker/build-push-action@v4
86+
uses: docker/build-push-action@v6
8287
with:
8388
context: .
8489
file: reth/Dockerfile
@@ -96,29 +101,29 @@ jobs:
96101
steps:
97102
- name: Checkout
98103
uses: actions/checkout@v2
99-
104+
100105
- name: Log into the Container registry
101106
uses: docker/login-action@v3
102107
with:
103108
registry: ${{ env.REGISTRY }}
104109
username: ${{ github.actor }}
105110
password: ${{ secrets.GITHUB_TOKEN }}
106-
111+
107112
- name: Set up QEMU
108113
uses: docker/setup-qemu-action@v2
109114
with:
110115
platforms: ${{ matrix.arch }}
111-
116+
112117
- name: Set up Docker Buildx
113118
uses: docker/setup-buildx-action@v3
114-
119+
115120
- name: Extract metadata for the Docker image
116121
id: meta
117122
uses: docker/metadata-action@v4
118123
with:
119124
images: |
120125
${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}
121-
126+
122127
- name: Build and push the Docker image
123128
uses: docker/build-push-action@v6
124129
with:

.github/workflows/pr.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
arch: [ linux/amd64, linux/arm64 ]
12+
arch: [linux/amd64, linux/arm64]
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3
1616
with:
1717
ref: ${{ github.event.pull_request.head.sha }}
18+
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v2
21+
with:
22+
platforms: linux/amd64,linux/arm64
23+
1824
- name: Set up Docker Buildx
1925
uses: docker/setup-buildx-action@v3
26+
2027
- name: Build the Docker image
21-
uses: docker/build-push-action@v4
28+
uses: docker/build-push-action@v6
2229
with:
2330
context: .
2431
file: geth/Dockerfile
@@ -39,7 +46,7 @@ jobs:
3946
- name: Set up Docker Buildx
4047
uses: docker/setup-buildx-action@v3
4148
- name: Build the Docker image
42-
uses: docker/build-push-action@v4
49+
uses: docker/build-push-action@v6
4350
with:
4451
context: .
4552
file: reth/Dockerfile
@@ -51,7 +58,7 @@ jobs:
5158
runs-on: ubuntu-latest
5259
strategy:
5360
matrix:
54-
arch: [ linux/amd64 ]
61+
arch: [linux/amd64]
5562
steps:
5663
- name: Checkout
5764
uses: actions/checkout@v3
@@ -66,4 +73,3 @@ jobs:
6673
file: nethermind/Dockerfile
6774
push: false
6875
platforms: ${{ matrix.arch }}
69-

geth/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ FROM golang:1.22 AS geth
1919

2020
WORKDIR /app
2121

22+
RUN apt-get update && \
23+
apt-get install -y \
24+
build-essential
25+
2226
ENV REPO=https://github.com/ethereum-optimism/op-geth.git
2327
ENV VERSION=v1.101411.6
2428
ENV COMMIT=50b3422b9ac682a8fa503c4f409339a9bff69717

0 commit comments

Comments
 (0)