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

Crossbuild docker image for different architectures #55

Merged
merged 9 commits into from
Dec 4, 2020

Conversation

Pentusha
Copy link
Contributor

@Pentusha Pentusha commented Dec 2, 2020

For issue #54
In order to use this code, you need to setup secrets in the repository. Repo settings -> Secrets
DOCKER_USERNAME
DOCKER_PASSWORD

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this just create multi-arch images for the latest tag?

I was initially planning on using a manifest instead of buildx and using Docker Hub's build rules to build the images rather than leveraging a GitHub action

.github/workflows/build.yml Outdated Show resolved Hide resolved
Co-authored-by: Chris C. <twin@twinnation.org>
@Pentusha
Copy link
Contributor Author

Pentusha commented Dec 2, 2020

Won't this just create multi-arch images for the latest tag?

It would create image for the latest tag. You may specify your custom tag or list of tags, even git commit.

@TwiN
Copy link
Owner

TwiN commented Dec 2, 2020

Alright, I've had a closer look and could you make the following changes?:

  1. Rename the existing .github/workflows/build.yml to .github/workflows/test.yml
  2. Create a new workflow file (.github/workflows/docker.yml) specifically for building the docker images on releases:
on:
  release:
    types: [published]

That way we should be able to use the GITHUB_REF environment variable to extract the tag.
The idea is that I want to only build images for other platforms when I release a new version rather than on the latest version.

Let me know if you need help.

@Pentusha
Copy link
Contributor Author

Pentusha commented Dec 3, 2020

It seems to be working fine
image

@Pentusha Pentusha requested a review from TwiN December 4, 2020 07:02
@TwiN
Copy link
Owner

TwiN commented Dec 4, 2020

Thank you for your contribution @Pentusha, and sorry for the delay. I've had a busy week 😅

@TwiN TwiN merged commit 6c91bbc into TwiN:master Dec 4, 2020
@TwiN
Copy link
Owner

TwiN commented Dec 4, 2020

Released in v1.9.1

P.S. I've also removed linux/arm/v6, as linux/arm/v7 and linux/arm64 covers all requested use cases right now.
This also lowers the time for the action to complete, but I might re-add it if it becomes necessary in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants