This repository was archived by the owner on Oct 20, 2024. It is now read-only.
Build and publish execution client #77
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish execution client | |
on: | |
workflow_dispatch: | |
inputs: | |
client: | |
description: "Execution client to build with native ERC-4337 tracers" | |
required: true | |
type: choice | |
options: | |
- go-ethereum | |
- nitro | |
- op-geth | |
- base-node | |
jobs: | |
docker: | |
runs-on: | |
group: erc-4337-execution-clients | |
labels: ubuntu-latest-4core | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Get client version | |
run: | | |
cd ./${{inputs.client}} && \ | |
git fetch --tags && \ | |
echo "CLIENT_GIT_TAG=$(git describe --tags)" >> $GITHUB_ENV && \ | |
cd .. | |
# TODO: Ideally we should always build for linux/amd64,linux/arm64. But some clients currently fails with linux/arm64. | |
- name: Set DOCKER_PLATFORMS environment variable | |
run: | | |
if [ "${{ inputs.client }}" != "nitro" ] && [ "${{ inputs.client }}" != "base-node" ]; then | |
echo "DOCKER_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV | |
else | |
echo "DOCKER_PLATFORMS=linux/amd64" >> $GITHUB_ENV | |
fi | |
- name: Recursively fetch all submodules | |
run: git submodule update --init --recursive --force | |
- name: Setup client directory | |
run: ./build_scripts/${{inputs.client}}.sh --only-setup | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_TOKEN}} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./${{inputs.client}} | |
platforms: ${{env.DOCKER_PLATFORMS}} | |
push: true | |
tags: stackupwallet/${{inputs.client}}:${{env.CLIENT_GIT_TAG}} |