feat: skip builds when base image digest unchanged#140
feat: skip builds when base image digest unchanged#140esteve wants to merge 1 commit intoblue-build:mainfrom
Conversation
Adds skip_if_base_unchanged input to conditionally skip builds when the base image digest has not changed.
|
This can help with making downloads faster, an example of this change in action can be seen in https://github.com/esteve/bluefinix/blob/5a2a310c8a0b3941339f7f61952399809d1313a1/.github/workflows/build.yml#L49 |
Sorry, it's been really busy for me. I'm actually wondering if this is something that could be added into the logic for the CLI so that other places can use this without having to come up with their own script. |
No problem, thanks for responding! 🙂 That might be a better approach, indeed. I can migrate that logic to the cli if you prefer. I'm actually working on adding an option to the CLI so that if the packages haven't changed in a new run, don't push a new image. This requires building a new image anyway, and comparing the list of packages and versions to the previous run, perhaps I can just add both features to the CLI. |
I'm not sure if that would be a feature to add mostly because we're trying to be distro agnostic and I'd rather not have to maintain logic for all the different package managers to test the versions. I will, however, fully welcome the other feature for the CLI. |
You should be able to do a check for the digest of the base image and then check for a label we set that contains the base image digest on the blue build image and just skip the build if they match. |
This PR adds an option (
skip_if_base_unchanged) to the action so that if the base image in a recipe hasn't changed, CI will skip the build process.