Skip to content

feat: skip builds when base image digest unchanged#140

Open
esteve wants to merge 1 commit into
blue-build:mainfrom
esteve:skip-if-base-unchanged
Open

feat: skip builds when base image digest unchanged#140
esteve wants to merge 1 commit into
blue-build:mainfrom
esteve:skip-if-base-unchanged

Conversation

@esteve

@esteve esteve commented Mar 12, 2026

Copy link
Copy Markdown

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.

Adds skip_if_base_unchanged input to conditionally skip builds
when the base image digest has not changed.
@esteve esteve requested review from gmpinder and xynydev as code owners March 12, 2026 19:32
@esteve

esteve commented Mar 12, 2026

Copy link
Copy Markdown
Author

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

@esteve

esteve commented Apr 7, 2026

Copy link
Copy Markdown
Author

@gmpinder @xynydev is this PR of interest for the project? I've been using it for a while from my fork for building my own images, is there anything that needs to improved/fixed? Thanks.

@gmpinder

gmpinder commented Apr 7, 2026

Copy link
Copy Markdown
Member

@gmpinder @xynydev is this PR of interest for the project? I've been using it for a while from my fork for building my own images, is there anything that needs to improved/fixed? Thanks.

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.

@esteve

esteve commented Apr 7, 2026

Copy link
Copy Markdown
Author

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.

@gmpinder

gmpinder commented Apr 7, 2026

Copy link
Copy Markdown
Member

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.

@gmpinder

gmpinder commented Apr 7, 2026

Copy link
Copy Markdown
Member

No problem, thanks for responding! 🙂 That might be a better approach, indeed. I can migrate that logic to the cli if you prefer.

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.

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