diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml index 1a92ec4..97846fc 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push.yaml @@ -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 @@ -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 @@ -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: @@ -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 }} \ No newline at end of file