Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ARM arch #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build-n-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ jobs:
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin

- name: Build Image
run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-build

- name: Push Image
run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-push
- name: Build and Push Image
run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-build-push

- name: Print Image Path
id: print-docker-image-path
run: echo IMAGE_PATH=`IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make print-docker-image-path` >> $GITHUB_OUTPUT
run: echo IMAGE_PATH=`IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make print-docker-image-path` >> $GITHUB_OUTPUT
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ build: cmd/server/main.go
go build -ldflags $(LDFLAGS) -mod vendor -o dist/provider ./cmd/server/main.go

docker-build:
docker build -t ${IMAGE_PATH} -f build/Dockerfile .
docker buildx build --platform=linux/amd64,linux/arm64 -t ${IMAGE_PATH} -f build/Dockerfile .
# docker buildx build --platform=linux/amd64 -t ${IMAGE_PATH} -f build/Dockerfile .

docker-push:
docker push ${IMAGE_PATH}

docker-build-push: docker-build
docker push ${IMAGE_PATH}
docker-build-push:
docker buildx build --push --platform=linux/amd64,linux/arm64 -t ${IMAGE_PATH} -f build/Dockerfile .

print-docker-image-path:
@echo ${IMAGE_PATH}

test-coverage:
go test -coverprofile=cover.out ./…
go tool cover -html=cover.out
go tool cover -html=cover.out
Loading