feat: standardize versioning across OSTree and os-release #1442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Chain PR with #1439
This PR swaps the tag generator with 2 parts, one that generates a primary tag that propagates throughout the containerfile, and one that generates a bunch of tags that are pushed to GHCR.
Primary Tag
The first part generates a unique tag and pretty version for the image that gets propagated to the Containerfile.
Examples (pretty, tag):
-
Stable (v3.6, F40.240603)
andstable-v3.6-40.240603
-
Testing (v3.6, F40.240603)
andtesting-v3.6-40.240603
-
Unstable (#asfcd32, F40.240603)
andunstable-asfcd32
-
PR (13435, F40)
andpr-40-13435
In this case, the upstream kinoite tag is used, indicating the package versions that make up the OS. This disambiguates bazzite tags and kinoite tags, as they use the same primary tag.
Currently, a timestamp tag generated on the moment is used, which is confusing to users.
Where applicable (meaning not unstable/PRs), it also contains the Bazzite version, which can be clearly communicated to users and used for marketing purposes.
The pretty release is then placed in os-release, under
BOOTLOADER_NAME
, which we can make OSTree use for grub.After building the image, this tag is fed through rechunk, which checks GHCR for the same tag and if it exists appends .1, .2, .3, etc. Then, rechunk attaches this to the container label, which is shown on
rpm-ostree status
. Unfortunately, the suffix will be absent from os-release and grub, since the image is already built.Secondary tags
Along with the unique version produced by rechunk, the secondary part of this action attaches a variety of tags to the uploaded image, including Bazzite version, Kinoite version, and Fedora version. The images are then tagged with podman and uploaded to GHCR with the existing action.
Important
#1439 needs to be merged first and the version structure needs a bit of polish.