Skip to content

Commit

Permalink
Add multi-platform build to internal node builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed Jun 14, 2024
1 parent 40e3414 commit 8c82532
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- pschork/multi-platform-releases
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -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() }}
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
3 changes: 3 additions & 0 deletions docker-compose-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8c82532

Please sign in to comment.