Compering taiko inbox height and geth height to set synced state (#579) #19
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: "[Nethermind] Catalyst Node - Docker build and push" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| tags: | |
| - "v*" | |
| paths: | |
| - "node/**" | |
| - "tools/p2p_node/p2p_network/**" | |
| env: | |
| DOCKER_REGISTRY: docker.io | |
| DOCKER_IMAGE_NAME: catalyst-node | |
| DOCKER_REPOSITORY: nethermind | |
| jobs: | |
| build: | |
| name: Build per-arch image | |
| runs-on: ${{ matrix.os }} | |
| if: github.repository == 'NethermindEth/Catalyst' | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux/amd64 | |
| short: amd64 | |
| - os: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| short: arm64 | |
| outputs: | |
| digest-amd64: ${{ steps.digest.outputs.amd64 }} | |
| digest-arm64: ${{ steps.digest.outputs.arm64 }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.DOCKER_REGISTRY }} | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: ${{ matrix.platform }} | |
| push: true | |
| outputs: type=image,name=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }},push-by-digest=true,name-canonical=true | |
| - name: Set digest output | |
| id: digest | |
| run: | | |
| if [ "${{ matrix.short }}" = "amd64" ]; then | |
| echo "amd64=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT | |
| fi | |
| if [ "${{ matrix.short }}" = "arm64" ]; then | |
| echo "arm64=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT | |
| fi | |
| merge: | |
| name: Merge and push multi-arch manifest | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.DOCKER_REGISTRY }} | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=latest | |
| type=ref,event=tag | |
| - name: Create manifest list and push | |
| run: | | |
| docker buildx imagetools create \ | |
| $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| ${{ needs.build.outputs.digest-amd64 }} \ | |
| ${{ needs.build.outputs.digest-arm64 }} | |
| - name: Summary | |
| run: | | |
| echo "## Docker build completed ✅" >> $GITHUB_STEP_SUMMARY | |
| echo "### Tags" >> $GITHUB_STEP_SUMMARY | |
| echo "${{ steps.meta.outputs.tags }}" | while IFS= read -r TAG; do | |
| echo "- $TAG" >> $GITHUB_STEP_SUMMARY | |
| done |