Skip to content

Commit

Permalink
add two jobs and a third one to push
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Sep 6, 2023
1 parent 6784291 commit 2056036
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions .github/workflows/build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ on:
type: string
required: false

inputs:
MACOS_PASSWORD:
required: true

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
Expand All @@ -41,11 +38,31 @@ jobs:
uses: docker/setup-buildx-action@v2
with:
endpoint: builders
- name: Unlock MacOS keychain for Docker Hub login
- 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}}
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
if: runner.os == 'macOS'
id: buildx-context
run: |
security -v unlock-keychain -p ${{ inputs.MACOS_PASSWORD }} ~/Library/Keychains/login.keychain-db
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
Expand All @@ -56,6 +73,10 @@ jobs:
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 @@ -73,4 +94,4 @@ jobs:
- linux/amd64
- linux/arm64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 2056036

Please sign in to comment.