Added default multi-platform builds for amd64 and arm64 docker images.#7
Added default multi-platform builds for amd64 and arm64 docker images.#7
Conversation
|
Let's see if we can get the github-script, checkout, & login actions updated so they don't give deprecation warnings. |
|
For multi-platform builds let's see how well the caching works - if it's pretty quick to build both platforms assuming that only the repository (and not dependencies) have changed then I think it makes sense to enable by default |
aelkiss
left a comment
There was a problem hiding this comment.
Would like to see the dependencies updated but otherwise looks good, and we can see about caching speedups for multiplatform builds.
There was a problem hiding this comment.
I took a look at the runs from https://github.com/hathitrust/ht_indexer/actions and there are a few things I'd like to try:
-
The run at https://github.com/hathitrust/ht_indexer/actions/runs/8053393423 still uses the deprecated node version; it looks like that's been addressed here, but I'd like to see an example of a run that uses this version to verify we don't get any deprecation warnings & that everything works as expected
-
Likewise in https://github.com/hathitrust/ht_indexer/actions/runs/8053393423/job/21995701014 it ran so quickly not because it was taking advantage of the cache but because the output image tag already existed (https://github.com/hathitrust/ht_indexer/actions/runs/8053393423/job/21995701014#step:3:248). I'd like to see a run of the action that exercises the cache functionality.
Also looking at that same run, I would suggest a couple of other changes:
- do
docker/login-action@v3before checking if the image exists - I think if it's a private image then it will always say it does not exist if we dodocker manifest inspectwithout logging in or otherwise might have issues - add
if: ${{ steps.image_check.outputs.image_exists != 'true' }}forsetup-qemu-actionandsetup-buildx-actionsince we only need to do that if we're actually going to build an image.
2d18bc0 to
ce02f86
Compare
aelkiss
left a comment
There was a problem hiding this comment.
Makes sense to me as we discussed, although we should hold off on merging this until:
- we're happy with how this looks like when it gets called
- we're certain (esp. with the changes in tagging) whether it's backwards-compatible or needs a new version
aelkiss
left a comment
There was a problem hiding this comment.
Moving the logic here looks good & with the test cases @Ronster2018 mentioned (might might be worth putting a link here) these should be ready to go.
|
Test Cases:
|
- Default multi-platform support for amd64 and arm64 docker images. - Updated versions for actions/checkout, actions/github-script, and docker/login-action - Added img_tag field to separate github tags and container image tags. - Added a core output for the id:latest_push. This way, if it's not the latest, we default to unstable while preserving the ability to add tags to the docker image as needed. - Moved logic from the template build.yml file to this shared action.
0f655f1 to
e28420e
Compare
The way this branch currently works is that there are two default platforms it will build; both ARM64 and AMD64 images. The
platformsargument may be omitted from the parent job that calls this composite action and it will still generate those images.