Skip to content

Commit

Permalink
[Chore] Update build-push-action to latest v6 (#403)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
0x00101010 authored Feb 3, 2025
1 parent de96297 commit 50ae0f7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Tag Docker image
on:
push:
branches:
- 'main'
- "main"
tags:
- 'v*'
- "v*"

env:
REGISTRY: ghcr.io
Expand All @@ -29,6 +29,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
Expand All @@ -41,7 +46,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: geth/Dockerfile
Expand Down Expand Up @@ -78,7 +83,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: reth/Dockerfile
Expand All @@ -96,29 +101,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.arch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}
- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64, linux/arm64 ]
arch: [linux/amd64, linux/arm64]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: geth/Dockerfile
Expand All @@ -39,7 +46,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: reth/Dockerfile
Expand All @@ -51,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64 ]
arch: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -66,4 +73,3 @@ jobs:
file: nethermind/Dockerfile
push: false
platforms: ${{ matrix.arch }}

4 changes: 4 additions & 0 deletions geth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ FROM golang:1.22 AS geth

WORKDIR /app

RUN apt-get update && \
apt-get install -y \
build-essential

ENV REPO=https://github.com/ethereum-optimism/op-geth.git
ENV VERSION=v1.101411.6
ENV COMMIT=50b3422b9ac682a8fa503c4f409339a9bff69717
Expand Down

0 comments on commit 50ae0f7

Please sign in to comment.