From 8c82532705c67f63178ef15db0392212b65c9f41 Mon Sep 17 00:00:00 2001 From: Patrick Schork <354473+pschork@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:33:44 -0700 Subject: [PATCH] Add multi-platform build to internal node builds --- .github/workflows/docker-publish.yaml | 11 ++++++----- Makefile | 3 +++ docker-compose-internal.yaml | 3 +++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 8b8f080f45..62a9fdf1d2 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -3,6 +3,7 @@ on: push: branches: - master + - pschork/multi-platform-releases pull_request: workflow_dispatch: @@ -45,12 +46,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # Build And Push Image - - name: Build Docker image - run: docker compose -f docker-compose-internal.yaml build - - name: Push Docker image + - name: Set internal release PUSH_FLAG + run: echo "PUSH_FLAG=--push" >> $GITHUB_ENV if: github.ref == 'refs/heads/master' - run: docker compose -f docker-compose-internal.yaml push + + - name: Build (and potentially push) internal docker image release + run: PUSH_FLAG=$PUSH_FLAG make docker-internal-build - name: Send GitHub Action trigger data to Slack workflow if: ${{ failure() }} diff --git a/Makefile b/Makefile index acd3b2d3a5..87a98dff48 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,9 @@ integration-tests-dataapi: make dataapi-build go test -v ./disperser/dataapi +docker-internal-build: + RELEASE_TAG=latest docker compose -f docker-compose-internal.yaml build --build-arg SEMVER=${SEMVER} --build-arg GITCOMMIT=${GITCOMMIT} --build-arg GITDATE=${GITDATE} ${PUSH_FLAG} + docker-release-build: RELEASE_TAG=${SEMVER} docker compose -f docker-compose-release.yaml build --build-arg SEMVER=${SEMVER} --build-arg GITCOMMIT=${GITCOMMIT} --build-arg GITDATE=${GITDATE} ${PUSH_FLAG} diff --git a/docker-compose-internal.yaml b/docker-compose-internal.yaml index 473aeec17f..6e34d194b4 100644 --- a/docker-compose-internal.yaml +++ b/docker-compose-internal.yaml @@ -24,6 +24,9 @@ services: build: context: . dockerfile: node/cmd/Dockerfile + platforms: + - "linux/amd64" + - "linux/arm64" image: ghcr.io/layr-labs/eigenda/node:${BUILD_TAG:-latest} churner: build: