Skip to content

Commit

Permalink
Adds support for multi-platform linux/amd64 & linux/arm64 docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed Jun 9, 2024
1 parent 44569ec commit 7bb647c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/docker-publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ success() }}

# Build And Push Image
- name: Build docker image release
run: make docker-release-build
if: ${{ success() }}

# Publish if release is tagged or force == true
- name: Push docker image release
run: make docker-release-push
- name: Determine release PUSH_FLAG
run: echo "PUSH_FLAG=--push" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.force == 'true'

- name: Display push flag
run: echo "${{ env.PUSH_FLAG }}"

- name: Build (and potentially push) docker image release
run: PUSH_FLAG=$PUSH_FLAG make docker-release-build
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docker-publish
name: docker-publish-internal
on:
push:
branches:
Expand Down Expand Up @@ -47,10 +47,10 @@ jobs:

# Build And Push Image
- name: Build Docker image
run: docker compose -f docker-compose-build.yaml build
run: docker compose -f docker-compose-internal.yaml build
- name: Push Docker image
if: github.ref == 'refs/heads/master'
run: docker compose -f docker-compose-build.yaml push
run: docker compose -f docker-compose-internal.yaml push

- name: Send GitHub Action trigger data to Slack workflow
if: ${{ failure() }}
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ integration-tests-dataapi:
go test -v ./disperser/dataapi

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}

docker-release-push:
RELEASE_TAG=${SEMVER} docker compose -f docker-compose-release.yaml push
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}

semver:
echo "${SEMVER}"
File renamed without changes.
6 changes: 6 additions & 0 deletions docker-compose-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ services:
build:
context: .
dockerfile: node/cmd/Dockerfile
platforms:
- "linux/amd64"
- "linux/arm64"
image: ghcr.io/layr-labs/eigenda/opr-node:${RELEASE_TAG}
nodeplugin:
build:
context: .
dockerfile: node/plugin/cmd/Dockerfile
platforms:
- "linux/amd64"
- "linux/arm64"
image: ghcr.io/layr-labs/eigenda/opr-nodeplugin:${RELEASE_TAG}

0 comments on commit 7bb647c

Please sign in to comment.