Skip to content

Commit b213caf

Browse files
committed
Mirror zkboost from eth-act/zkboost master
Adds a multi-arch (amd64+arm64) build for ghcr.io/eth-act/zkboost via upstream's docker/Dockerfile, published as ethpandaops/zkboost:master on every push to upstream master. Useful for devnet configs that want a moving "latest from master" tag, which upstream zkboost doesn't publish (only SHA-tagged builds and release-tagged :latest).
1 parent 3c32932 commit b213caf

5 files changed

Lines changed: 141 additions & 0 deletions

File tree

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Build zkboost docker image
2+
run-name: "${{ inputs.repository }}@${{ inputs.ref }}${{ inputs.correlation_id && format(' [{0}]', inputs.correlation_id) || '' }}"
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
repository:
8+
description: The source zkboost repository to build from
9+
default: eth-act/zkboost
10+
type: string
11+
required: true
12+
ref:
13+
description: The branch, tag or SHA to checkout and build from
14+
default: master
15+
type: string
16+
required: true
17+
docker_tag:
18+
description: Override target docker tag (defaults to the above source ref if left blank)
19+
type: string
20+
required: false
21+
correlation_id:
22+
description: Optional correlation ID passed through to the run name (used by integrations)
23+
type: string
24+
required: false
25+
26+
jobs:
27+
prepare:
28+
runs-on: ubuntu-latest
29+
outputs:
30+
platforms: ${{ steps.setup.outputs.platforms }}
31+
target_tag: ${{ steps.tag.outputs.docker_tag }}
32+
steps:
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
- name: Prepare Matrix
35+
id: setup
36+
uses: ./.github/actions/prepare
37+
with:
38+
client: 'zkboost'
39+
repository: ${{ inputs.repository }}
40+
ref: ${{ inputs.ref }}
41+
- name: Generate target tag
42+
id: tag
43+
uses: ./.github/actions/docker-tag
44+
with:
45+
input: ${{ inputs.docker_tag || inputs.ref }}
46+
repository: ${{ inputs.repository }}
47+
upstream_repository: eth-act/zkboost
48+
deploy:
49+
needs:
50+
- prepare
51+
runs-on: ${{ matrix.runner }}
52+
continue-on-error: true
53+
strategy:
54+
matrix:
55+
include: ${{fromJson(needs.prepare.outputs.platforms)}}
56+
outputs:
57+
git_commit_hash: ${{ steps.set_output.outputs.git_commit_hash }}
58+
steps:
59+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
- uses: ./.github/actions/install-deps
61+
with:
62+
repository: ${{ inputs.repository }}
63+
- uses: ./.github/actions/deploy
64+
id: deploy
65+
with:
66+
source_repository: ${{ inputs.repository }}
67+
source_ref: ${{ inputs.ref }}
68+
target_tag: ${{ needs.prepare.outputs.target_tag }}-${{ matrix.slug }}
69+
target_repository: ethpandaops/zkboost
70+
platform: ${{ matrix.platform }}
71+
build_script: ./zkboost/build.sh
72+
73+
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
74+
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
75+
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
76+
GOPROXY: "${{ vars.GOPROXY }}"
77+
HARBOR_USERNAME: "${{ vars.HARBOR_USERNAME }}"
78+
HARBOR_PASSWORD: "${{ secrets.HARBOR_PASSWORD }}"
79+
harbor_registry: ${{ vars.HARBOR_REGISTRY }}
80+
81+
- name: Set job output
82+
id: set_output
83+
run: echo "git_commit_hash=${{ steps.deploy.outputs.git_commit_hash }}" >> $GITHUB_OUTPUT
84+
shell: bash
85+
manifest:
86+
needs:
87+
- prepare
88+
- deploy
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
92+
- uses: ./.github/actions/manifest
93+
with:
94+
source_repository: ${{ inputs.repository }}
95+
source_ref: ${{ inputs.ref }}
96+
target_tag: ${{ needs.prepare.outputs.target_tag }}
97+
target_repository: ethpandaops/zkboost
98+
platforms: ${{ needs.prepare.outputs.platforms }}
99+
harbor_registry: ${{ vars.HARBOR_REGISTRY }}
100+
HARBOR_USERNAME: "${{ vars.HARBOR_USERNAME }}"
101+
HARBOR_PASSWORD: "${{ secrets.HARBOR_PASSWORD }}"
102+
git_commit_hash: ${{ needs.deploy.outputs.git_commit_hash }}
103+
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
104+
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
105+
notify:
106+
name: Discord Notification
107+
runs-on: ubuntu-latest
108+
needs:
109+
- prepare
110+
- deploy
111+
- manifest
112+
if: failure()
113+
steps:
114+
- name: Notify
115+
uses: nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1
116+
with:
117+
github-token: ${{ secrets.github_token }}
118+
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}

branches.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ ere-server-zisk:
219219
branches:
220220
- master
221221

222+
zkboost:
223+
branches:
224+
- master
225+
222226
fuzztools:
223227
branches:
224228
- main

generate_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'meth': 'ethereum/go-ethereum',
4545
'nevermind': 'nethermindeth/nethermind',
4646
'ere-server-zisk': 'eth-act/ere',
47+
'zkboost': 'eth-act/zkboost',
4748
'fuzztools': 'protocol-security/fuzztools',
4849
# Add more defaults as needed
4950
}

platforms.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ nevermind:
122122
- linux/arm64
123123
ere-server-zisk:
124124
- linux/amd64
125+
zkboost:
126+
- linux/amd64
127+
- linux/arm64
125128
fuzztools:
126129
- linux/amd64
127130
- linux/arm64

zkboost/build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+
cd ${SCRIPT_DIR}/../source
6+
7+
echo "Building zkboost image (commit ${source_git_commit_hash})..."
8+
docker build \
9+
-f docker/Dockerfile \
10+
-t "${target_repository}:${target_tag}" \
11+
-t "${target_repository}:${target_tag}-${source_git_commit_hash}" \
12+
.
13+
14+
docker push "${target_repository}:${target_tag}"
15+
docker push "${target_repository}:${target_tag}-${source_git_commit_hash}"

0 commit comments

Comments
 (0)