BurntSushi / erd

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
The Unlicense
1.79k stars 154 forks source link

Build arm64 Docker image #115

Closed felixvanoost closed 10 months ago

felixvanoost commented 11 months ago

Builds and tests a multi-architecture Docker image for both linux/amd64 and linux/arm64 platforms as discussed in this comment and in #114. This allows ARM-based machines to run the image natively with no emulation.

manifest-digest

This includes the following changes:

I appreciate that this reliance on a 3rd party is far from optimal and fully understand if the decision is made to reject this PR. The only two other viable approaches to build multi-archecture binaries would be to:

Closes #40 Closes #114

felixvanoost commented 11 months ago

@mmzx mentioning you in case GitHub doesn't send notifications for PRs. 😅

mmzx commented 10 months ago

I think we can do this! Thank you!

felixvanoost commented 10 months ago

@mmzx Any idea when the next Erd release might be available to include these changes? I'm just looking for a rough idea when I can start integrating this in downstream projects. ✌🏻

felixvanoost commented 10 months ago

@mmzx I noticed the CI build job failed after merging these changes. Adding this step at the beginning of the workflow should resolve the repository naming issue seen here:

- name: Make the image name lowercase
  run: |
    echo "IMAGE_NAME_LOWERCASE=${IMAGE_NAME,,}" >>${GITHUB_ENV}
  env:
    IMAGE_NAME: '${{ github.repository }}'

And then use IMAGE_NAME_LOWERCASE instead of IMAGE_NAME in the rest of the workflow. I can test these changes locally and submit another PR, but it's difficult to validate without directly testing in this repo. The solution above is taken from another GitHub discussion.

For the other job that failed on the BuildJet runner, you'll have to set up BuildJet on your account here. If this is an issue because @BurntSushi is the repo owner and it can only be done by him, I may have to build and publish the images in my fork instead.

felixvanoost commented 6 months ago

Hey @mmzx, is this still something you'd be willing to look into?