Skip to content

GHA: Simplify Container Image Action - #5

Open
oxzi wants to merge 1 commit into
mainfrom
simplification
Open

oxzi wants to merge 1 commit into
mainfrom
simplification

Conversation

@oxzi

@oxzi oxzi commented Nov 11, 2026

Copy link
Copy Markdown
Member

Drop the "Prepare metadata" stage and only use the "docker/metadata-action". This is possible as no backports or the like are necessary here.

Suffix the Debian version instead of prefixing, following conventions.

Furthermore, make the base container name configurable for the test image, and add a big warning to the README.


Fixes #4.

.github/workflows/container-image.yml builds the containers twice, once for testing it, and then again for pushing it. Any chance of reducing this to a single build so that the same image ist tested and then pushed?

This does not seem to be possible with the docker/build-push-action action, but since a local build cache should be used, I don't see much harm in doing so.

Drop the "Prepare metadata" stage and only use the
"docker/metadata-action". This is possible as no backports or the like
are necessary here.

Suffix the Debian version instead of prefixing, following conventions.

Furthermore, make the base container name configurable for the test
image, and add a big warning to the README.
@oxzi
oxzi requested a review from julianbrost November 11, 2026 15:49
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Nov 11, 2026

@julianbrost julianbrost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine in general, just two places that are probably more questions where I'd like a quick confirmation/explanation.

Comment on lines 49 to 50
flavor: |
# Disable automatic 'latest' tagging as our custom logic is used to
# determine when to apply the 'latest' tag.
latest=false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now the removal of this comment slightly confuses me. The reason why this was set is gone, but you keep the setting as-is. Not sure if that was intentional or an oversight.

Comment on lines 51 to +54
tags: |
type=edge,prefix=${{ matrix.debian_version }}-
type=semver,pattern={{version}},prefix=${{ matrix.debian_version }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.debian_version }}-
type=semver,pattern={{major}},prefix=${{ matrix.debian_version }}-,enable=${{ env.LATEST_MAJOR }}
type=raw,value=${{ matrix.debian_version }},enable=${{ env.LATEST }}
type=raw,value=${{ matrix.debian_version }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=semver,pattern={{version}},suffix=-${{ matrix.debian_version }}
type=edge,suffix=-${{ matrix.debian_version }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So compared to the different version labels I can currently see on https://github.com/Icinga/icinga2-plugins-container/pkgs/container/icinga2-plugins-container (0, 0.2, 0.2.0), those would be reduced back to only the full version (0.2.0)?

If so, that sounds reasonable. In the end, practically only the tags like trixie will be used, so if we can cut down additional complexity, great.

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

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial review

2 participants