joshuanianji / idris-2-docker

Multi-arch, multi-distro Docker images for Idris 2
MIT License
13 stars 2 forks source link

CI/CD Pipeline Refactoring #38

Closed joshuanianji closed 10 months ago

joshuanianji commented 1 year ago

Currently, all packages republishes every single version during the cron job. This is pretty annoying; I should only publish latest during cron.

Also, I can slightly improve the pipeline structure by not making the consumer-build-test and devcontainer-build-test dependant on the base-deploy. This puts a subtle dependency on the Github Container registry uploading the new base image fast enough, which feels like a bad design.

I think I should pass the base image around via github artifacts, and change the FROM step to import the entire image from a argument. For arm builds this might introduce complexity when referencing images, so I'll have to be careful.

This might result in another full scale refactoring...

joshuanianji commented 1 year ago

One idea I've been having is to make a single workflow file to deploy a single version for all of the images. It can be triggered manually, or by a reusable workflow.

Thus, the "deploy latest" cron only needs to deploy the latest tag. Maybe we can have a test option so, for testing, all images over all versions run, which can be done via matrix build.

The only issue with this is that the cool arrows might not show up as much :c

joshuanianji commented 1 year ago

Instead of relying on caches to pass images around, I can also upload artifacts

Here is an example of uploading docker images as tar files (multiple architectures): https://github.com/docker/build-push-action/blob/master/TROUBLESHOOTING.md