Skip to content

Commit

Permalink
Build Docker images for both arm and amd
Browse files Browse the repository at this point in the history
  • Loading branch information
vegarsti committed Jun 18, 2024
1 parent e231198 commit b3dba38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
name: "Build"

on:
push:
branches:
- main
# on:
# push:
# branches:
# - main

on: pull_request

jobs:
build:
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ gen-mocks: bin/moq ./client/jsonrpc/ ./client/duneapi/


image-build:
@echo "# Building indexer docker image..."
docker build -t $(APPLICATION) -f Dockerfile --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} .
@echo "# Building indexer docker image for amd64 and arm64"
docker buildx build --platform linux/amd64 -t ${APPLICATION}-amd64 -f Dockerfile --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} .
docker buildx build --platform linux/arm64 -t ${APPLICATION}-arm64 -f Dockerfile --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} .
docker manifest create -a "${APPLICATION}" "${APPLICATION}-amd64"
docker manifest create -a "${APPLICATION}" "${APPLICATION}-arm64"

image-push: image-build
@echo "# Pushing indexer docker image..."
docker tag $(APPLICATION) ${IMAGE_TAG}
# docker push ${IMAGE_TAG}
@echo "# Pushing indexer docker images"
docker tag ${APPLICATION} ${IMAGE_TAG}
docker push ${IMAGE_TAG}
docker rmi ${IMAGE_TAG}

0 comments on commit b3dba38

Please sign in to comment.