Skip to content

Commit

Permalink
Merge pull request #56 from ethpandaops/bbusa/armbuilder
Browse files Browse the repository at this point in the history
feat: add mac mini arm builder
  • Loading branch information
barnabasbusa authored Sep 6, 2023
2 parents a35c35b + 2056036 commit e950c6e
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 6 deletions.
58 changes: 52 additions & 6 deletions .github/workflows/build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,35 @@ on:
- master
tags:
- '**'
workflow_dispatch:
inputs:
repository:
default: ethpandaops/ethereum-genesis-generator
type: string
required: true
ref:
description: The branch, tag or SHA to checkout and build from
default: master
type: string
required: true
docker_tag:
description: Override target docker tag (defaults to the above source ref if left blank)
type: string
required: false

jobs:
build-push:
name: build-push
runs-on: ubuntu-latest
name: build-push-x86
runs-on:
- ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Context for Buildx
shell: bash
id: buildx-context
run: |
docker context create builders
docker context use builders || docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
Expand All @@ -33,6 +48,35 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
build-push-arm:
name: build-push-arm
runs-on: ARM
steps:
- name: Checkout this repo
uses: actions/checkout@v3
- name: Set up Docker Context for Buildx
shell: bash
id: buildx-context
run: |
docker context use builders || docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: builders
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ethpandaops/ethereum-genesis-generator
flavor: latest=true
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
push-image:
depends-on: [build-push-x86, build-push-arm]
name: build-push-arm
runs-on: ubuntu-latest
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -46,6 +90,8 @@ jobs:
file: Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
platforms: linux/amd64,linux/arm64
platforms:
- linux/amd64
- linux/arm64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
3 changes: 3 additions & 0 deletions runners.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linux/amd64: ubuntu-latest
linux/arm64: ARM64
darwin/arm64: ARM64

0 comments on commit e950c6e

Please sign in to comment.