Skip to content

Conversation

@cdce8p
Copy link
Member

@cdce8p cdce8p commented Nov 22, 2025

@cdce8p
Copy link
Member Author

cdce8p commented Nov 22, 2025

@sairon Based on my suggestion in the other PR, I added a reusable workflow for the builder. A nice side effect is the added grouping in the workflow run view https://github.com/home-assistant/docker-base/actions/runs/19587880102?pr=328.

Overall the PR should work fine but might still have some rough edges. I wasn't quite sure where the best place to draw the line would be. We can either define most variables in the builder workflow itself and pass it as inputs or do some conditional magic in Set build arguments. For the first attempt I chose a bit of both.

Let me know what you think.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @cdce8p 👍

../Frenck

                       

Blogging my personal ramblings at frenck.dev

@frenck frenck merged commit dc986ed into home-assistant:master Nov 22, 2025
40 checks passed
@cdce8p cdce8p deleted the ci-reuseable-workflow branch November 22, 2025 09:25
@sairon
Copy link
Member

sairon commented Nov 25, 2025

This introduced a bug, the Python images are now tagged incorrectly, as the version suffix is attached to alpine version, while it should be ${{ matrix.python }}-alpine${{ matrix.version }}-${{ github.event.release.tag_name }}. Fix on the way.

sairon added a commit that referenced this pull request Nov 25, 2025
Reusable workflow introduced in #328 broke suffixing of Python base images, as
the format there is different than for the rest. Add special handling if Python
version is set in the workflow.
sairon added a commit that referenced this pull request Nov 25, 2025
Reusable workflow introduced in #328 incorrectly stores the latest versions in
GH environment instead of in the output variables. Fix the target variable to
correctly tag latest releases again.
sairon added a commit that referenced this pull request Nov 25, 2025
Reusable workflow introduced in #328 incorrectly stores the latest versions in
GH environment instead of in the output variables. Fix the target variable to
correctly tag latest releases again.
sairon added a commit that referenced this pull request Nov 25, 2025
Reusable workflow introduced in #328 incorrectly stores the latest versions in
GH environment instead of in the output variables. Fix the target variable to
correctly tag latest releases again.
sairon added a commit that referenced this pull request Nov 25, 2025
Reusable workflow introduced in #328 broke suffixing of Python base images, as
the format there is different than for the rest. Add special handling if Python
version is set in the workflow.
@sairon
Copy link
Member

sairon commented Nov 25, 2025

Overall the PR should work fine but might still have some rough edges. I wasn't quite sure where the best place to draw the line would be. We can either define most variables in the builder workflow itself and pass it as inputs or do some conditional magic in Set build arguments. For the first attempt I chose a bit of both.

I only looked at the code in detail now, as I didn't pay much attention once it was merged, but after reading it, I think I might prefer to do as much of the conditional magic on the side of the "caller" - currently I had some issues understanding what ends up where (hence the bunch of force-pushed commits above, which included incorrectly staged hunk).

@cdce8p
Copy link
Member Author

cdce8p commented Nov 26, 2025

This introduced a bug, the Python images are now tagged incorrectly, as the version suffix is attached to alpine version, while it should be ${{ matrix.python }}-alpine${{ matrix.version }}-${{ github.event.release.tag_name }}. Fix on the way.

Thanks for the quick fix!

I only looked at the code in detail now, as I didn't pay much attention once it was merged, but after reading it, I think I might prefer to do as much of the conditional magic on the side of the "caller" - currently I had some issues understanding what ends up where (hence the bunch of force-pushed commits above, which included incorrectly staged hunk).

The added complexity is one of the small downsides unfortunately. Anything left I should help with at this point or would you prefer to do it yourself / leave it as is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants