Skip to content

Commit 888f3f7

Browse files
authored
feat: add guardian (#250)
Signed-off-by: Barnabas Busa <busa.barnabas@gmail.com>
1 parent 0109772 commit 888f3f7

5 files changed

Lines changed: 116 additions & 1 deletion

File tree

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Run the *Build **client*** workflow;
2222
- [Build Grandine](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-grandine.yml) [[source](https://github.com/grandinetech/grandine)]
2323

2424
Run the *Build **tooling*** workflow;
25+
- [Build Eth-DAS-Guardian](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-eth-das-guardian.yml) [[source](https://github.com/probe-lab/eth-das-guardian)]
2526
- [Build Flashbots Builder](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-flashbots-builder.yml) [[source](https://github.com/flashbots/builder)]
2627
- [Build tx-fuzz](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-tx-fuzz.yaml) [[source](https://github.com/MariusVanDerWijden/tx-fuzz)]
2728
- [Build consesnus-monitor](https://github.com/ethpandaops/eth-client-docker-image-builder/blob/master/.github/workflows/build-push-consensus-monitor.yml) [[source](https://github.com/ralexstokes/ethereum_consensus_monitor)]

branches.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ ethrex:
166166
branches:
167167
- main
168168

169+
eth-das-guardian:
170+
branches:
171+
- main
172+
169173
# Commented out in config.yaml
170174
# goevmlab:
171175
# branches: ["master"]

generate_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
'rustic-builder': 'pawanjay176/rustic-builder',
3434
'mev-boost': 'flashbots/mev-boost',
3535
'mev-boost-relay': 'flashbots/mev-boost-relay',
36-
'goevmlab': 'holiman/goevmlab'
36+
'goevmlab': 'holiman/goevmlab',
37+
'eth-das-guardian': 'probe-lab/eth-das-guardian'
3738
# Add more defaults as needed
3839
}
3940

platforms.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,6 @@ goevmlab:
9393
ethrex:
9494
- linux/amd64
9595
- linux/arm64
96+
eth-das-guardian:
97+
- linux/amd64
98+
- linux/arm64

0 commit comments

Comments
 (0)