-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
build images for amd64 and arm64 platform (for Apple Silicon, M1, M2) #33
build images for amd64 and arm64 platform (for Apple Silicon, M1, M2) #33
Conversation
8bcfa3b
to
80db364
Compare
Please see #31 (comment) Ideally it would build arm64 weekly and if we need it manually. How does this PR only build on master? |
files: docker-compose.yml | ||
load: true | ||
set: | | ||
*.platform=linux/amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is why tests runs only for amd64, that is why it is quick for pull requests and push events.
.github/workflows/docker-image.yml
Outdated
files: docker-compose.yml | ||
push: true | ||
set: | | ||
*.platform=linux/amd64,linux/arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is an if statement, it runs only for tags and for the master branch.
It already runs for amd64 and arm64 weekly. I do not see any advantages if it would be separated. I spent 2 days to implement this. I do not have more free time to work on this. I can develop now with my own builds, and I have to. But you can modify this PR as you like. |
I've added an additional step to build arm only on master/tags AND schedule/manually. Thank you! |
I saw it late, there is another PR (#31 ) which resolves this issue. Mine is different, because I used the native docker actions, not directly the buildx command.
The tests runs only for amd64, that is why it is fast. The master builds lasts for 1 hour both for amd64 and arm64.
Since I made it for the other repository (yiisoft/yii2-docker#161), I updated this, with the same modifications.
Images are pushed to here: https://hub.docker.com/repository/docker/albertborsos/yii-php/general
I tested, it works.