From d4896844345409cb399c2ea5b52d9e0586ea0336 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Thu, 2 May 2024 10:18:02 +0200 Subject: [PATCH 1/2] feat: add build args --- .github/actions/deploy/action.yml | 6 ++++++ .github/workflows/build-push-lighthouse.yml | 6 ++++++ .github/workflows/build-push-mev-rs.yml | 6 ++++++ config.yaml | 14 +++++++++++--- lighthouse/Dockerfile.minimal | 13 ------------- 5 files changed, 29 insertions(+), 16 deletions(-) delete mode 100644 lighthouse/Dockerfile.minimal diff --git a/.github/actions/deploy/action.yml b/.github/actions/deploy/action.yml index cbdcb31..297831e 100644 --- a/.github/actions/deploy/action.yml +++ b/.github/actions/deploy/action.yml @@ -31,6 +31,11 @@ inputs: description: The platform to build for type: string required: true + build_args: + description: Build arguments to pass to the Docker build + default: "" + type: string + required: false # Secrets DOCKER_USERNAME: required: true @@ -130,6 +135,7 @@ runs: tags: ${{ inputs.target_repository }}:${{ inputs.target_tag }}-${{ steps.git_commit_hash.outputs.git_commit_hash }},${{ inputs.target_repository }}:${{ inputs.target_tag }} push: true platforms: ${{ inputs.platform }} + build-args: ${{ inputs.build_args }} labels: | ethpandaops.io.repo=${{ inputs.source_repository }} ethpandaops.io.commitRef=${{ inputs.source_ref }} diff --git a/.github/workflows/build-push-lighthouse.yml b/.github/workflows/build-push-lighthouse.yml index a53a2c4..6b5e697 100644 --- a/.github/workflows/build-push-lighthouse.yml +++ b/.github/workflows/build-push-lighthouse.yml @@ -17,6 +17,11 @@ on: description: Override target docker tag (defaults to the above source ref if left blank) type: string required: false + build_args: + description: Build arguments to pass to the Docker build + default: "" + type: string + required: false jobs: prepare: @@ -51,6 +56,7 @@ jobs: target_repository: ethpandaops/lighthouse target_dockerfile: ./lighthouse/Dockerfile platform: ${{ matrix.platform }} + build_args: ${{ inputs.build_args }} DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}" DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}" diff --git a/.github/workflows/build-push-mev-rs.yml b/.github/workflows/build-push-mev-rs.yml index 0eb226f..980fb8e 100644 --- a/.github/workflows/build-push-mev-rs.yml +++ b/.github/workflows/build-push-mev-rs.yml @@ -17,6 +17,11 @@ on: description: Override target docker tag (defaults to the above source ref if left blank) type: string required: false + build_args: + description: Build arguments to pass to the Docker build + default: "" + type: string + required: false jobs: prepare: @@ -69,6 +74,7 @@ jobs: target_tag: ${{ inputs.docker_tag || inputs.ref }} target_repository: ethpandaops/mev-rs platforms: ${{ needs.prepare.outputs.platforms }} + build_args: ${{ inputs.build_args }} DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}" DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}" diff --git a/config.yaml b/config.yaml index 6ae342a..da558df 100644 --- a/config.yaml +++ b/config.yaml @@ -96,7 +96,8 @@ target: tag: unstable-minimal repository: ethpandaops/lighthouse - dockerfile: ./lighthouse/Dockerfile.minimal + build_args: FEATURES=spec-minimal + dockerfile: ./lighthouse/Dockerfile # Xatu Sentry builds - source: repository: sigp/lighthouse @@ -405,11 +406,18 @@ dockerfile: ./grandine/Dockerfile.minimal ############# -# goteth # +# mev-rs # ############# - source: repository: ralexstokes/mev-rs ref: main target: tag: main - repository: ethpandaops/mev-rs \ No newline at end of file + repository: ethpandaops/mev-rs +- source: + repository: ralexstokes/mev-rs + ref: main + target: + tag: main-minimal + repository: ethpandaops/mev-rs + build_args: --features minimal-preset \ No newline at end of file diff --git a/lighthouse/Dockerfile.minimal b/lighthouse/Dockerfile.minimal deleted file mode 100644 index d8accbc..0000000 --- a/lighthouse/Dockerfile.minimal +++ /dev/null @@ -1,13 +0,0 @@ -FROM rust:1.76-bullseye AS builder -RUN apt-get clean && apt-get update && apt-get -y upgrade && apt-get install -y cmake clang libclang-dev protobuf-compiler -ARG FEATURES=spec-minimal -COPY . lighthouse -RUN cd lighthouse && make - -FROM ubuntu:22.04 -RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \ - libssl-dev \ - ca-certificates \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/lighthouse From 85a13c4261869b50ee535fcaf2793eb6ca85b616 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Thu, 2 May 2024 10:24:33 +0200 Subject: [PATCH 2/2] fix schema --- schema.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/schema.yaml b/schema.yaml index 5624498..f860b4d 100644 --- a/schema.yaml +++ b/schema.yaml @@ -13,3 +13,4 @@ target: tag: str() repository: str() dockerfile: str(required=False) + build_args: str(required=False)