Skip to content

Commit

Permalink
feat(ci): tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Apr 8, 2024
1 parent e34eb9a commit 25f4b86
Show file tree
Hide file tree
Showing 25 changed files with 520 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Deploy
description: Build and push a docker image to Docker Hub

inputs:
Expand Down
21 changes: 6 additions & 15 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ inputs:
description: 'The client'
required: true
outputs:
matrix:
description: "Matrix of platforms and runner to use"
value: ${{ steps.setup_matrix.outputs.matrix }}
platforms:
description: "Comma-separated list of platforms"
description: "Matrix of platforms and runner to use"
value: ${{ steps.setup_platforms.outputs.platforms }}
runs:
using: "composite"
Expand All @@ -18,10 +15,10 @@ runs:
uses: actions/checkout@v4
- uses: mikefarah/yq@v4.35.1
- name: Generate platform and runner matrix from config files
id: setup_matrix
id: setup_platforms
shell: bash
run: |
MATRIX_JSON="["
PLATFORMS_JSON="["
client="${{ inputs.client }}"
# Extract the platforms for the specified client
Expand All @@ -30,14 +27,8 @@ runs:
for platform in $platforms; do
slug=$(echo "$platform" | tr '/' '-')
runner=$(yq e ".\"$platform\"" runners.yaml)
MATRIX_JSON+="{\"platform\":\"$platform\", \"runner\":\"$runner\", \"slug\":\"$slug\"},"
PLATFORMS_JSON+="{\"platform\":\"$platform\", \"runner\":\"$runner\", \"slug\":\"$slug\"},"
done
MATRIX_JSON="${MATRIX_JSON%,}]"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
- name: Generate platforms comma-separated list
id: setup_platforms
shell: bash
run: |
PLATFORMS=$(echo '${{ steps.setup_matrix.outputs.matrix }}' | jq -r '.[] | .platform' | paste -sd "," -)
echo "platforms=$PLATFORMS" >> $GITHUB_OUTPUT
PLATFORMS_JSON="${PLATFORMS_JSON%,}]"
echo "platforms=$PLATFORMS_JSON" >> $GITHUB_OUTPUT
11 changes: 5 additions & 6 deletions .github/workflows/build-push-armiarma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/armiarma
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-beacon-metrics-gazer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/beacon-metrics-gazer
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-besu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -48,9 +47,9 @@ jobs:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./besu/build.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/besu
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-consensus-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/consensus-monitor
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-eleel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,10 +46,10 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/eleel
target_dockerfile: ./eleel/Dockerfile
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-erigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/erigon
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-ethereumjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,10 +46,10 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/ethereumjs
target_dockerfile: ./ethereumjs/Dockerfile
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-execution-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/execution-monitor
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-flashbots-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/flashbots-builder
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-push-genesis-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,10 +33,10 @@ jobs:
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
runs-on: ${{ platforms.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
platform:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
Expand All @@ -47,9 +46,9 @@ jobs:
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ platform.slug }}
target_repository: ethpandaops/ethereum-genesis-generator
platform: ${{ matrix.platform }}
platform: ${{ platform.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
Expand Down
Loading

0 comments on commit 25f4b86

Please sign in to comment.