aurora/Justfile

931 lines
33 KiB
Makefile
Raw Normal View History

refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
# Min just version 1.46.0 https://github.com/casey/just/issues/2290
export repo_organization := env("GITHUB_REPOSITORY_OWNER", "ublue-os")
export base_image_org := env("BASE_IMAGE_ORG", "quay.io/fedora-ostree-desktops")
export base_image_name := env("BASE_IMAGE_NAME", "kinoite")
2026-05-08 07:41:58 -08:00
stable_version := "44"
latest_version := "44"
testing_version := "44"
images := '(
[aurora]=aurora
[aurora-dx]=aurora-dx
)'
flavors := '(
[main]=main
[nvidia-open]=nvidia-open
)'
tags := '(
[stable]=stable
[latest]=latest
[testing]=testing
)'
# Build Containers
chunkah := shell("yq -r \".images[] | select(.name == \\\"chunkah\\\") | \\\"\\\\(.image)@\\\\(.digest)\\\"\" image-versions.yml")
common := shell("yq -r \".images[] | select(.name == \\\"common\\\") | \\\"\\\\(.image)@\\\\(.digest)\\\"\" image-versions.yml")
brew := shell("yq -r \".images[] | select(.name == \\\"brew\\\") | \\\"\\\\(.image)@\\\\(.digest)\\\"\" image-versions.yml")
export SUDO_DISPLAY := if `if [ -n "${DISPLAY:-}" ] || [ -n "${WAYLAND_DISPLAY:-}" ]; then echo true; fi` == "true" { "true" } else { "false" }
export SUDOIF := if `id -u` == "0" { "" } else { "sudo" }
export PODMAN := "podman"
export BUILDAH := "buildah"
2025-05-18 23:39:33 -08:00
just := just_executable()
# Define a retry function for use in recipes
retry_function := '
retry() {
if [[ "${#}" -lt 3 ]]; then
echo "retry usage: <number of tries> <time between retries> <command> ..."
return 1
fi
tries="${1}"
sleep="${2}"
shift 2
for i in $(seq 1 ${tries}); do
if [[ ${i} -gt 1 ]]; then
# echo "[+] Command failed. Waiting for ${sleep} seconds"
sleep ${sleep}
fi
# echo "[+] Running (try: ${i}): ${@}"
"${@}" && r=0 && break || r=$?
done
return $r
}
'
[private]
default:
2025-05-18 23:39:33 -08:00
@{{ just }} --list
# Check Just Syntax
[group('Just')]
check:
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
find . -type f -name "*.just" | while read -r file; do
echo "Checking syntax: $file"
{{ just }} --fmt --check -f $file
done
echo "Checking syntax: Justfile"
{{ just }} --fmt --check -f Justfile
# Fix Just Syntax
[group('Just')]
fix:
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
find . -type f -name "*.just" | while read -r file; do
echo "Checking syntax: $file"
{{ just }} --fmt -f $file
done
echo "Checking syntax: Justfile"
{{ just }} --fmt -f Justfile || { exit 1; }
# Clean Repo
[group('Utility')]
clean:
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eoux pipefail
rm -f changelog.md
rm -f output.env
rm -rf sbom_out
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
rm -f /tmp/aurora*-tags.json
# Check if valid combo
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[private]
validate $image $tag $flavor:
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eou pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
declare -A images={{ images }}
declare -A tags={{ tags }}
declare -A flavors={{ flavors }}
checkimage="${images[${image}]-}"
checktag="${tags[${tag}]-}"
checkflavor="${flavors[${flavor}]-}"
# Validity Checks
if [[ -z "$checkimage" ]]; then
echo "Invalid Image..."
exit 1
fi
if [[ -z "$checktag" ]]; then
echo "Invalid tag..."
exit 1
fi
if [[ -z "$checkflavor" ]]; then
echo "Invalid flavor..."
exit 1
fi
# Build Image
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("image", long="image", short="i")]
[arg("kernel_pin", long="kernel-pin")]
[arg("rechunk", long="rechunk", value="true")]
[arg("tag", long="tag", short="t")]
[group('Image')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
build $image="aurora" $tag="latest" $flavor="main" $rechunk="false" $ghcr="false" $kernel_pin="":
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
akmods_flavor=$({{ just }} akmods_flavor --tag "${tag}")
fedora_version=$({{ just }} fedora_version --image "${image}" --tag "${tag}" --flavor "${flavor}")
# Verify Base Image with cosign
{{ just }} verify-container quay.io-fedora-ostree-desktops.pub ${base_image_org}/${base_image_name}:${fedora_version}
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
# Here we pin our kernels to workaround regressions!
# skopeo list-tags docker://ghcr.io/ublue-os/akmods | jq -r '.Tags | map(select(contains("coreos-stable-44")))'
ARCH=$(arch)
case "${tag}" in
stable)
if [[ "${ARCH}" == "x86_64" ]]; then
# <Here is a link why we have it pinned>
kernel_pin=""
elif [[ "${ARCH}" == "aarch64" ]]; then
kernel_pin=""
fi
;;
latest)
if [[ "${ARCH}" == "x86_64" ]]; then
kernel_pin=""
elif [[ "${ARCH}" == "aarch64" ]]; then
kernel_pin=""
fi
;;
testing)
if [[ "${ARCH}" == "x86_64" ]]; then
kernel_pin=""
elif [[ "${ARCH}" == "aarch64" ]]; then
kernel_pin=""
fi
;;
esac
if [[ -z "${kernel_pin:-}" ]]; then
kernel_release=$(skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/akmods:"${akmods_flavor}"-"${fedora_version}" | jq -r '.Labels["ostree.linux"]')
else
kernel_release="${kernel_pin}"
fi
# Verify Containers with Cosign
{{ just }} verify-container cosign.pub "ghcr.io/ublue-os/akmods:${akmods_flavor}-${fedora_version}-${kernel_release}"
if [[ "${akmods_flavor}" =~ coreos ]]; then
{{ just }} verify-container cosign.pub "ghcr.io/ublue-os/akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}"
fi
if [[ "${flavor}" =~ nvidia-open ]]; then
{{ just }} verify-container cosign.pub "ghcr.io/ublue-os/akmods-nvidia-open:${akmods_flavor}-${fedora_version}-${kernel_release}"
fi
cosign verify \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp="github.com/get-aurora-dev/common/.github/workflows/*" \
"{{ common }}"
cosign verify \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp="github.com/coreos/chunkah/.github/workflows/*" \
"{{ chunkah }}"
{{ just }} verify-container cosign.pub "{{ brew }}"
# Get Version
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
TIMESTAMP="$(date +%Y%m%d)"
if [[ "${tag}" =~ stable ]]; then
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
ver="${fedora_version}.${TIMESTAMP}"
else
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
ver="${tag}-${fedora_version}.${TIMESTAMP}"
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
POINT=$({{ just }} generate-point --image "${image}" --tag "${tag}" --flavor "${flavor}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
ver="${ver}.$POINT"
# Build Arguments
BUILD_ARGS=()
# Target
if [[ "${image}" =~ dx ]]; then
BUILD_ARGS+=("--build-arg" "IMAGE_FLAVOR=dx")
target="dx"
fi
BUILD_ARGS+=("--build-arg" "AKMODS_FLAVOR=${akmods_flavor}")
BUILD_ARGS+=("--build-arg" "BASE_IMAGE_ORG=${base_image_org}")
BUILD_ARGS+=("--build-arg" "BASE_IMAGE_NAME=${base_image_name}")
BUILD_ARGS+=("--build-arg" "FEDORA_MAJOR_VERSION=${fedora_version}")
BUILD_ARGS+=("--build-arg" "COMMON={{ common }}")
BUILD_ARGS+=("--build-arg" "BREW={{ brew }}")
BUILD_ARGS+=("--build-arg" "IMAGE_NAME=${image_name}")
BUILD_ARGS+=("--build-arg" "IMAGE_VENDOR={{ repo_organization }}")
BUILD_ARGS+=("--build-arg" "KERNEL=${kernel_release}")
BUILD_ARGS+=("--build-arg" "VERSION=${ver}")
if [[ -z "$(git status -s)" ]]; then
BUILD_ARGS+=("--build-arg" "SHA_HEAD_SHORT=$(git rev-parse --short HEAD)")
else
BUILD_ARGS+=("--build-arg" "SHA_HEAD_SHORT=deadbeef")
fi
BUILD_ARGS+=("--build-arg" "UBLUE_IMAGE_TAG=${tag}")
# Labels
LABELS=()
LABELS+=("--label" "containers.bootc=1")
2026-05-10 07:26:48 -08:00
LABELS+=("--label" "io.artifacthub.package.deprecated=false")
LABELS+=("--label" "io.artifacthub.package.keywords=bootc,fedora,aurora,ublue,universal-blue,kde,linux")
LABELS+=("--label" "io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4")
LABELS+=("--label" "io.artifacthub.package.maintainers=[{\"name\": \"NiHaiden\", \"email\": \"me@nhaiden.io\"}]")
LABELS+=("--label" "io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/aurora/refs/heads/main/README.md")
LABELS+=("--label" "org.opencontainers.image.created=$(date -u +%Y\-%m\-%d\T%H\:%M\:%S\Z)")
2026-05-10 07:26:48 -08:00
LABELS+=("--label" "org.opencontainers.image.description=The ultimate productivity workstation")
LABELS+=("--label" "org.opencontainers.image.documentation=https://docs.getaurora.dev")
LABELS+=("--label" "org.opencontainers.image.source=https://raw.githubusercontent.com/ublue-os/aurora/refs/heads/main/Containerfile.in")
LABELS+=("--label" "org.opencontainers.image.title=${image_name}")
LABELS+=("--label" "org.opencontainers.image.url=https://getaurora.dev")
LABELS+=("--label" "org.opencontainers.image.vendor={{ repo_organization }}")
2026-05-10 07:26:48 -08:00
LABELS+=("--label" "org.opencontainers.image.version=${ver}")
if [[ -z "$(git status -s)" ]]; then
LABELS+=("--label" "org.opencontainers.image.revision=$(git rev-parse HEAD)")
else
LABELS+=("--label" "org.opencontainers.image.revision=deadbeef")
fi
2026-05-10 07:26:48 -08:00
LABELS+=("--label" "ostree.linux=${kernel_release}")
case "${akmods_flavor}" in
"coreos-stable") BUILD_ARGS+=("--cpp-flag=-DZFS") ;;
esac
if [[ "${image_name}" =~ nvidia ]]; then
BUILD_ARGS+=("--cpp-flag=-DNVIDIA")
fi
PODMAN_BUILD_ARGS=("${BUILD_ARGS[@]}" "${LABELS[@]}" --tag "${image_name}:${tag}" --file Containerfile.in)
# Bump retries to minimize network flakes
PODMAN_BUILD_ARGS+=("--retry=5" "--retry-delay=60s")
# So we always have the newest images when building locally
if [[ "${ghcr}" == "false" ]]; then
PODMAN_BUILD_ARGS+=("--pull=newer")
fi
# Add GitHub token secret if available (for CI/CD)
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
echo "Adding GitHub token as build secret"
PODMAN_BUILD_ARGS+=(--secret "id=GITHUB_TOKEN,env=GITHUB_TOKEN")
else
echo "No GitHub token found - build may hit rate limit"
fi
${BUILDAH} build "${PODMAN_BUILD_ARGS[@]}" .
echo "::endgroup::"
# Build Image and Rechunk
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("kernel_pin", long="kernel-pin")]
[arg("tag", long="tag", short="t")]
[group('Image')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
build-rechunk $image="aurora" $tag="latest" $flavor="main" kernel_pin="": (build image tag flavor kernel_pin) (rechunk image tag flavor)
# Rechunk Image
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Image')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
rechunk $image="aurora" $tag="latest" $flavor="main":
#!/usr/bin/env bash
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
export CHUNKAH_CONFIG_STR=$(${PODMAN} inspect "${image_name}:${tag}")
set -eoux pipefail
${PODMAN} run --rm --mount=type=image,src="${image_name}:${tag}",target=/chunkah \
-e CHUNKAH_CONFIG_STR "{{ chunkah }}" \
build \
--verbose \
--compressed \
--max-layers 128 \
--prune /sysroot/ \
--label ostree.commit- --label ostree.final-diffid- \
--tag "${image_name}:${tag}" | ${PODMAN} load
# build-chunked-oci
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("image", long="image", short="i")]
[arg("previous_build", long="previous-build", value="true")]
[arg("tag", long="tag", short="t")]
[group('Image')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
ostree-rechunk $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $previous_build="false":
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
fedora_version=$({{ just }} fedora_version --image "${image}" --tag "${tag}" --flavor "${flavor}")
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "{{ ghcr }}" == "false" ]]; then
{{ just }} load-rootful --image "${image}" --tag "${tag}" --flavor "${flavor}"
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
# TODO: Redo everything here with --previous-build in rpm-ostree 2026.1+
# so we don't have to pull an old image + rename it
if [[ "${previous_build}" == "true" ]]; then
PREVIOUS_IMAGE=ghcr.io/{{ repo_organization }}/"${image_name}":"${tag}"
# https://github.com/coreos/rpm-ostree/blob/7e2f2065a4aa4d5965b4537bb7d74e0b2898650e/rust/src/compose.rs#L522-L529
if skopeo inspect docker://"${PREVIOUS_IMAGE}" | jq -e '.LayersData[1:] | all(.Annotations?["ostree.components"]?)'; then
${SUDOIF} ${PODMAN} pull ${PREVIOUS_IMAGE}
else
echo "${PREVIOUS_IMAGE} doesn't exist. Making a fresh layer Plan instead."
fi
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${ghcr}" == "true" ]]; then
CHUNKED_IMAGE="${image_name}:${tag}"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${previous_build}" == "true" ]]; then
CHUNKED_IMAGE="${PREVIOUS_IMAGE}"
fi
else
# keep the original unrechunked image for local builds
CHUNKED_IMAGE="${image_name}:${tag}-chunked"
fi
# 96 layers, conservative default, same what ci-test is using
# one layer is secretly being added for the ostree export
# 499 is podman run limit
# 128 is docker pull limit
${SUDOIF} ${PODMAN} run --rm \
--privileged \
-v "/var/lib/containers:/var/lib/containers" \
--entrypoint /usr/bin/rpm-ostree \
"${base_image_org}/${base_image_name}:${fedora_version}" \
compose build-chunked-oci \
--max-layers 127 \
--format-version=2 \
--bootc \
--from "localhost/${image_name}:${tag}" \
--output containers-storage:${CHUNKED_IMAGE}
2026-05-11 12:10:01 -08:00
# rename the image to localhost
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${ghcr}" == "true" && "${previous_build}" == "true" ]]; then
${SUDOIF} ${PODMAN} tag ${CHUNKED_IMAGE} "${image_name}:${tag}"
2026-05-11 12:10:01 -08:00
${SUDOIF} ${PODMAN} image rm -f ${CHUNKED_IMAGE}
fi
# For Privileged operations
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Image')]
load-rootful $image="aurora" $tag="latest" $flavor="main":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -oux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
if [[ ! "$(id -u)" == 0 ]]; then
ID=$(${PODMAN} images --filter reference="${image_name}:${tag}" --format "'{{ '{{.ID}}' }}'")
if [[ -z "$ID" ]]; then
{{ just }} build "$image" "$tag" "$flavor"
fi
${PODMAN} image scp "${image_name}:${tag}" root@localhost::
fi
# Generate OCI Archive for PR Testing
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Utility')]
export-oci $image="aurora" $tag="latest" $flavor="main":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -oux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
ARCHIVE_NAME="${image_name}"-"$(arch)".oci
${PODMAN} push --compression-format=zstd --compression-level=3 "${image_name}:${tag}" oci-archive:"${ARCHIVE_NAME}"
# Run Container
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Image')]
run $image="aurora" $tag="latest" $flavor="main":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
# Check if image exists
ID=$(${PODMAN} images --filter reference="${image_name}:${tag}" --format "'{{ '{{.ID}}' }}'")
if [[ -z "$ID" ]]; then
2025-05-18 23:39:33 -08:00
{{ just }} build "$image" "$tag" "$flavor"
fi
# Run Container
${PODMAN} run -it --rm "${image_name}:${tag}" bash
# Test Changelogs
[group('Changelogs')]
changelogs branch="stable" handwritten="":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eou pipefail
python3 ./.github/changelogs.py "{{ branch }}" ./output.env ./changelog.md --workdir . --handwritten "{{ handwritten }}"
# Verify Container with Cosign
[group('Utility')]
verify-container key="" container="":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eou pipefail
# Get Cosign if Needed
if [[ ! $(command -v cosign) ]]; then
COSIGN_CONTAINER_ID=$(${SUDOIF} ${PODMAN} create cgr.dev/chainguard/cosign:latest bash)
${SUDOIF} ${PODMAN} cp "${COSIGN_CONTAINER_ID}":/usr/bin/cosign /usr/local/bin/cosign
${SUDOIF} ${PODMAN} rm -f "${COSIGN_CONTAINER_ID}"
fi
# Verify Cosign Image Signatures if needed
if [[ -n "${COSIGN_CONTAINER_ID:-}" ]]; then
if ! cosign verify --certificate-oidc-issuer=https://token.actions.githubusercontent.com --certificate-identity=https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main cgr.dev/chainguard/cosign >/dev/null; then
echo "NOTICE: Failed to verify cosign image signatures."
exit 1
fi
fi
# Verify Container using cosign public key
if ! cosign verify --key "{{ key }}" "{{ container }}" >/dev/null; then
echo "NOTICE: Verification failed. Please ensure your public key is correct."
exit 1
fi
# Secureboot Check
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Utility')]
secureboot $image="aurora" $tag="latest" $flavor="main":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eou pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
# Get the vmlinuz to check
kernel_release=$(${PODMAN} inspect "${image_name}":"${tag}" | jq -r '.[].Config.Labels["ostree.linux"]')
TMP=$(${PODMAN} create "${image_name}":"${tag}" bash)
${PODMAN} cp "$TMP":/usr/lib/modules/"${kernel_release}"/vmlinuz /tmp/vmlinuz
${PODMAN} rm "$TMP"
# Get the Public Certificates
curl --retry 3 -Lo /tmp/kernel-sign.der https://github.com/ublue-os/akmods/raw/main/certs/public_key.der
curl --retry 3 -Lo /tmp/akmods.der https://github.com/ublue-os/akmods/raw/main/certs/public_key_2.der
openssl x509 -in /tmp/kernel-sign.der -out /tmp/kernel-sign.crt
openssl x509 -in /tmp/akmods.der -out /tmp/akmods.crt
# Make sure we have sbverify
CMD="$(command -v sbverify || true)"
if [[ -z "${CMD:-}" ]]; then
temp_name="sbverify-${RANDOM}"
${PODMAN} run -dt \
--entrypoint /bin/sh \
--volume /tmp/vmlinuz:/tmp/vmlinuz:z \
--volume /tmp/kernel-sign.crt:/tmp/kernel-sign.crt:z \
--volume /tmp/akmods.crt:/tmp/akmods.crt:z \
--name ${temp_name} \
docker.io/library/alpine:edge
${PODMAN} exec ${temp_name} apk add sbsigntool
CMD="${PODMAN} exec ${temp_name} /usr/bin/sbverify"
fi
# Confirm that Signatures Are Good
$CMD --list /tmp/vmlinuz
returncode=0
if ! $CMD --cert /tmp/kernel-sign.crt /tmp/vmlinuz || ! $CMD --cert /tmp/akmods.crt /tmp/vmlinuz; then
echo "Secureboot Signature Failed...."
returncode=1
fi
if [[ -n "${temp_name:-}" ]]; then
${PODMAN} rm -f "${temp_name}"
fi
exit "$returncode"
# Get Fedora Version of an image
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[private]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
fedora_version image="aurora" tag="latest" flavor="main":
#!/usr/bin/env bash
set -eou pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image {{ image }} --tag {{ tag }} --flavor {{ flavor }}
2026-02-01 03:28:38 -09:00
# Determine Version
if [[ "{{ tag }}" =~ stable ]]; then
VERSION="{{ stable_version }}"
elif [[ "{{ tag }}" =~ testing ]]; then
VERSION="{{ testing_version }}"
else
VERSION="{{ latest_version }}"
fi
echo "${VERSION}"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("tag", long="tag", short="t")]
[private]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
akmods_flavor tag="latest":
#!/usr/bin/env bash
set -eou pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "{{ tag }}" =~ stable ]]; then
akmods_flavor="coreos-stable"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
elif [[ "{{ tag }}" =~ testing ]]; then
akmods_flavor="main"
else
akmods_flavor="main"
fi
echo "${akmods_flavor}"
# Image Name
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[private]
image_name image="aurora" tag="latest" flavor="main":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eoux pipefail
{{ just }} validate --image {{ image }} --tag {{ tag }} --flavor {{ flavor }}
if [[ "{{ flavor }}" =~ main ]]; then
image_name={{ image }}
else
image_name="{{ image }}-{{ flavor }}"
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
echo "${image_name}"
# Generate Tags
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("github_event", long="github-event")]
[arg("github_number", long="github-number")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[arg("version", long="version")]
[group('Utility')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
generate-build-tags $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $version="" $github_event="" $github_number="":
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
FEDORA_VERSION=$({{ just }} fedora_version --image "${image}" --tag "${tag}" --flavor "${flavor}")
IMAGE_NAME=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
TIMESTAMP="$(date +%Y%m%d)"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
version="${FEDORA_VERSION}.${TIMESTAMP}"
BUILD_TAGS=()
COMMIT_TAGS=()
# Commit Tags
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
github_number="${github_number}"
SHA_SHORT="$(git rev-parse --short HEAD)"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${ghcr}" == "true" ]]; then
COMMIT_TAGS+=(pr-${github_number:-}-${tag}-${version})
COMMIT_TAGS+=(${SHA_SHORT}-${tag}-${version})
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
POINT=$({{ just }} generate-point --image "${image}" --tag "${tag}" --flavor "${flavor}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
# These are always used regardless of the stream
COMMON_TAGS=()
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
COMMON_TAGS+=("${tag}")
COMMON_TAGS+=("${tag}-${version}")
COMMON_TAGS+=("${tag}-${version:3}")
COMMON_TAGS+=("${tag}-${version}.${POINT}")
COMMON_TAGS+=("${tag}-${version:3}.${POINT}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
BUILD_TAGS=("${COMMON_TAGS[@]}" "${BUILD_TAGS[@]}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
# No special handling here for testing for now
if [[ "{{ tag }}" == stable ]]; then
# Legacy Compatibility Tag so stable-daily points to stable, do not remove this
# TODO: Move this to :latest after the ZFS removal to get daily updates again
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
BUILD_TAGS+=("{{ tag }}-daily")
BUILD_TAGS+=("${version}")
BUILD_TAGS+=("{{ tag }}-daily-${version}")
BUILD_TAGS+=("{{ tag }}-daily-${version:3}")
BUILD_TAGS+=("{{ tag }}-daily-${version}.${POINT}")
BUILD_TAGS+=("{{ tag }}-daily-${version:3}.${POINT}")
elif [[ "{{ tag }}" == latest ]]; then
# We only want :$FEDORA_VERSION to point to :latest
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
BUILD_TAGS+=("{{ tag }}-${FEDORA_VERSION}")
BUILD_TAGS+=("${FEDORA_VERSION}-${version}")
BUILD_TAGS+=("${FEDORA_VERSION}-${version:3}")
BUILD_TAGS+=("${FEDORA_VERSION}-${version}.${POINT}")
BUILD_TAGS+=("${FEDORA_VERSION}-${version:3}.${POINT}")
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
github_event="${github_event}"
if [[ "${github_event}" == "pull_request" ]]; then
alias_tags=("${COMMIT_TAGS[@]}")
else
alias_tags=("${BUILD_TAGS[@]}")
fi
echo "${alias_tags[*]}"
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
# Get Index Point for multiple daily images
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
[private]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
generate-point $image="aurora" $tag="latest" $flavor="main":
#!/usr/bin/env bash
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
IMAGE_NAME=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
TIMESTAMP="$(date +%Y%m%d)"
tags="/tmp/${IMAGE_NAME}-tags.json"
if [[ ! -f ${tags} ]]; then
skopeo list-tags docker://ghcr.io/{{ repo_organization }}/${IMAGE_NAME} > "${tags}"
fi
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ $(jq --arg tag "${tag}" --arg timestamp "${TIMESTAMP}" 'any(.Tags[]; contains($tag + "-" + $timestamp))' < "${tags}") == "true" ]]; then
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
# our image already exists, so find the highest POINT
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
POINT=$(jq -r --arg tag "${tag}" --arg timestamp "${TIMESTAMP}" \
feat(ci): add index point for multiple daily builds (#2285) Currently we are tagging these: ``` latest latest-44.20260531 latest-20260531 latest-44 44-44.20260531 44-20260531 ``` and this PR will add: ``` latest-44.20260531.2 latest-20260531.2 44-44.20260531.2 44-20260531.2 ``` and for stable: ``` stable stable-44.20260531 stable-20260531 stable-daily 44.20260531 stable-daily-44.20260531 stable-daily-20260531 ``` ``` stable-44.20260531.1 stable-20260531.1 stable-daily-44.20260531.1 stable-daily-20260531.1 ``` Today there has been no stable image released so it starts out with .1 but there has been a single latest image, so it bumps it to .2 Very much inspired by ublue-os/main's solution [1], but this implementation has a bug where where it will find the first "missing" POINT (not the highest!) in the tags. This would falsely choose the wrong POINT in the case we delete a bad image and there is a "gap". For example, we have the images .1-3 already on the registry, then delete .2 and this implementation would correctly choose the next image as .4 (instead of .2) as it's not just a dumb while loop. This is very much an edge case and makes the jq command quite cursed but I think this should always be reliable. This feature has been broken previously because we didn't tag the image with an index point number so no matter how many images we have built that day, it was always .1 in the various VESRION fields in os-release. fixes: https://github.com/ublue-os/aurora/issues/1833 [1]: https://github.com/ublue-os/main/blob/ef33e7ca96d797702cc137b6eefc8a08ed50d068/Justfile#L239-L251
2026-06-01 03:38:29 -08:00
'($tag + "-" + $timestamp) as $base | [ .Tags[] | select(startswith($base + ".")) ] | sort_by(split(".")[-1]
| tonumber)
|.[-1] | if . == null then "1" else split(".")[-1] end' < "${tags}")
((POINT++))
else
# there is no image that exists for that day yet
POINT=1
fi
echo "${POINT}"
# Tag Images
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("default_tag", long="default-tag")]
[arg("image", long="image", short="i")]
[arg("tags", long="tags")]
[group('Utility')]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
tag-images $image="" $default_tag="" $tags="":
#!/usr/bin/env bash
set -eoux pipefail
# Get Image, and untag
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
IMAGE=$(${PODMAN} inspect "${image}:${default_tag}" | jq -r .[].Id)
${PODMAN} untag localhost/"${image}:${default_tag}"
# Tag Image
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
# Do not quote this, we want word splitting here
for tag in ${tags}; do
${PODMAN} tag $IMAGE ${image}:${tag}
done
# Show Images
${PODMAN} images
# Extract Container and generate SBOM
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Utility')]
gen-sbom $image="aurora" $tag="latest" $flavor="main" $syft_cmd="syft":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
OUT_DIR="sbom_out/${image_name}"
mkdir -p "${OUT_DIR}"
# We have to do it this stupid way because we are OOMing on github runners
# https://github.com/anchore/syft/issues/3800
${PODMAN} container create --replace --name ${image_name} "${image_name}:${tag}"
ROOTFS="${OUT_DIR}/rootfs"
mkdir -p "${ROOTFS}"
${PODMAN} export ${image_name} | tar -C "${ROOTFS}" -xf -
${PODMAN} container rm ${image_name}
SBOM="${OUT_DIR}/sbom.json"
${syft_cmd} --source-name "${image_name}:${tag}" "${OUT_DIR}" -o syft-json=${SBOM}
du -sh "${SBOM}"
rm -rf "${ROOTFS}"
# DNF CI package cache
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("github_event", long="github-event")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Utility')]
[private]
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
setup-cache $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $github_event="":
#!/usr/bin/env bash
set -eou pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
fedora_version=$({{ just }} fedora_version --image "${image}" --tag "${tag}" --flavor "${flavor}")
ALLOW_CACHE_WRITE="false"
BLESSED_IMAGE=aurora-dx
if [[ "${image_name}" == "${BLESSED_IMAGE}" ]] && \
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[[ "${ghcr}" == "true" ]] && \
[[ "${github_event}" == "workflow_dispatch" || "${github_event}" == "schedule" ]]; then
ALLOW_CACHE_WRITE="true"
fi
CACHE_NAME="${BLESSED_IMAGE}-${fedora_version}"
echo "${CACHE_NAME}" "${ALLOW_CACHE_WRITE}"
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[private]
bootc $image="aurora" $tag="latest" $flavor="main" *ARGS:
#!/usr/bin/env bash
set -eoux pipefail
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
{{ just }} validate --image "${image}" --tag "${tag}" --flavor "${flavor}"
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
BOOTC_INSTALL_OPTIONS=()
BOOTC_INSTALL_OPTIONS+=("-v" "/var/lib/containers:/var/lib/containers" "-v" "/etc/containers:/etc/containers")
if [[ -d /sys/fs/selinux ]]; then
BOOTC_INSTALL_OPTIONS+=("-v" "/sys/fs/selinux:/sys/fs/selinux" "--security-opt" "label=type:unconfined_t")
fi
${PODMAN} run \
--rm --privileged --pid=host \
-it \
"${BOOTC_INSTALL_OPTIONS[@]}" \
-v /dev:/dev \
-v "${BUILD_BASE_DIR:-.}:/data" \
"${image_name}:${tag}" bootc {{ ARGS }}
# Create bootable image
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("backend", long="backend")]
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("image", long="image", short="i")]
[arg("tag", long="tag", short="t")]
[group('Utility')]
disk-image $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $backend="ostree":
#!/usr/bin/env bash
set -eoux pipefail
# this is enough for base aurora to make it more likely to run in CI
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${ghcr}" == "true" ]]; then
# absurd size so it will always be enough for the image
IMG_SIZE=35G
else
# Should at least be enough to rebase and install couple applications
IMG_SIZE=40G
fi
BYTES_IMAGE_SIZE=$(numfmt --from=iec ${IMG_SIZE})
if [ ! -e "${BUILD_BASE_DIR:-.}/bootable.img" ]; then
FREE_SPACE=$(findmnt -bno AVAIL -T "${BUILD_BASE_DIR:-.}")
if [ "${FREE_SPACE}" -gt "${BYTES_IMAGE_SIZE}" ]; then
fallocate -l "${BYTES_IMAGE_SIZE}" "${BUILD_BASE_DIR:-.}/bootable.img"
else
echo "not enough disk space available"
exit 1
fi
fi
BOOTC_INSTALL_ARGS=()
BOOTC_INSTALL_ARGS+=("--generic-image" "--via-loopback" "/data/bootable.img" "--wipe")
if [[ "${backend}" == "ostree" ]]; then
BOOTC_INSTALL_ARGS+=("--bootloader grub")
else
BOOTC_INSTALL_ARGS+=("--bootloader systemd" "--composefs-backend")
fi
{{ just }} bootc "${image}" "${tag}" "${flavor}" install to-disk "${BOOTC_INSTALL_ARGS[@]}"
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
# FIXME: Please consider using podman push in the future for signing as well instead of temporary tag + cosign
# See: https://github.com/ublue-os/aurora/pull/2199
# Once https://github.com/containers/podman/issues/27796 is resolved
# Push Image to Registry
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
[arg("flavor", long="flavor", short="f")]
[arg("ghcr", long="ghcr", value="true")]
[arg("image", long="image", short="i")]
[arg("registry", long="registry")]
[arg("tag", long="tag", short="t")]
[arg("temp_push", long="temp-push", value="true")]
[arg("temp_push_tag", long="temp-push-tag")]
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
[group('Utility')]
push-image $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $registry="" $temp_push="false" $temp_push_tag="":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
set -eoux pipefail
PUSH_CMD_ARGS=()
PUSH_CMD_ARGS+=("--digestfile=/tmp/digestfile")
PUSH_CMD_ARGS+=("--compression-format=zstd")
PUSH_CMD_ARGS+=("--compression-level=3")
PUSH_CMD_ARGS+=("--retry-delay=30s")
PUSH_CMD_ARGS+=("--retry=5")
PUSH_CMD=""${PODMAN}" push "${PUSH_CMD_ARGS[@]}""
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
image_name=$({{ just }} image_name --image "${image}" --tag "${tag}" --flavor "${flavor}")
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
alias_tags=$({{ just }} generate-build-tags --image "${image}" --tag "${tag}" --flavor "${flavor}")
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${ghcr}" == "true" && -n "${registry}" ]]; then
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
if [[ "${temp_push}" == "false" ]]; then
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
for tag in ${alias_tags}; do
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
${PUSH_CMD} ${image_name}:${tag} ${registry}/${image_name}:${tag}
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
# We need to push twice to workaround https://github.com/containers/podman/issues/27796
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
${PUSH_CMD} ${image_name}:${tag} ${registry}/${image_name}:${tag}
cat /tmp/digestfile
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
done
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
elif [[ "${temp_push}" == "true" ]]; then
${PUSH_CMD} ${image_name}:${tag} ${registry}/${image_name}:${temp_push_tag}-${tag}
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
# We need to push twice to workaround https://github.com/containers/podman/issues/27796
# If we don't do this then the digest changes and we are only signing this specific tag
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
${PUSH_CMD} ${image_name}:${tag} ${registry}/${image_name}:${temp_push_tag}-${tag}
fix(ci): push production tags after signing (#2231) * fix(ci): push production tags after signing If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to. The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org [1] [2] [3]. To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes. This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features. Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well. This effort can be seen at [4]. Although we are likely hitting [5] here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes. fixes: https://github.com/ublue-os/aurora/issues/2135 [1]: https://github.com/ublue-os/bazzite/pull/4902 [2]: https://github.com/ublue-os/main/issues/643 [3]: https://github.com/ublue-os/bazzite/issues/3044 [4]: https://github.com/containers/podman/issues/27796 [5]: https://github.com/ublue-os/aurora/pull/2199 Signed-off-by: renner <renner0@posteo.de> * fix: cosign verify It seems like cosign tries to verify all .sig files on the registry for that digest, one of which is generated by cosign sign with a static key and one is generated by actions/attest using an OIDC. This exactly broke, which is what we have been using for the longest time: ``` cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest Error: no matching attestations: expected key signature, not certificate error during command execution: no matching attestations: expected key signature, not certificate ``` And this currently works to verify the image, although it is of course not the same thing as singing with the ublue cosign key. This will not work going forward after this commit: ``` cosign verify \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \ ghcr.io/ublue-os/aurora:latest ``` Signed-off-by: renner <renner0@posteo.de> * feat: use staging for the temporary tag This is just a minor cosmetic thing and recudes the amount of tags we have because it's static and not changing unlike the run id. Signed-off-by: renner <renner0@posteo.de> * fix: use empty string by default for temporary tag Signed-off-by: renner <renner0@posteo.de> * fix: don't use signing config Or else we are getting this error with new cosign 3.X.X ``` Error: must provide --new-bundle-format or --bundle where applicable with --signing-config or --use-signing-config error during command ``` Signed-off-by: renner <renner0@posteo.de> * chore: bump cosign-installer to v4.1.2 * chore: move oras install to beginning as well if this fails at the beginning because of jank then it's not so bad * fix(ci): make sbom signing work ``` Error: error getting signing config from TUF: error setting TUF options: error setting TUF mirror: error reading remote.json: open /home/runner/.sigstore/root/remote.json: permission denied ``` --------- Signed-off-by: renner <renner0@posteo.de>
2026-05-30 09:37:58 -08:00
fi
else
echo "This is intended to be run in ghcr only."
exit 1
fi
# Login to Container Registry
[group('Utility')]
login-registry bin="" registry="":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -euxo pipefail
{{ retry_function }}
retry 5 60 echo "${GITHUB_TOKEN}" | "{{ bin }}" login "{{ registry }}" -u "${GITHUB_ACTOR}" --password-stdin
# # Examples:
# > just retag-nvidia-on-ghcr stable stable-41.20250126.3 0
# > just retag-nvidia-on-ghcr latest latest-41.20250228.1 0
#
# working_tag: The tag of the most recent known good image (e.g., latest.20250126.3)
# stream: One of latest, stable or testing
# dry_run: Only print the skopeo commands instead of running them
#
# First generate a PAT with package write access (https://github.com/settings/tokens)
# and set $GITHUB_USERNAME and $GITHUB_PAT environment variables
# Retag images on GHCR
[group('Admin')]
retag-nvidia-on-ghcr working_tag="" stream="" dry_run="1":
refactor(ci): initial work for using flag/arg-based workflow (#2443) * refactor(ci): initial work for using flag/arg-based workflow The goal of this is to make the buildsystem function like any other CLI program. The only recipes I haven't touched in this PR are the very simple recipes like verify-container, retag-nvidia-ghcr and login-registry. In the future I want to split up this Justfile in multiple smaller ones where it feels right to do that. resolves: https://github.com/ublue-os/aurora/issues/2436 * document minimum just version * build recipe * feat: redo the way we do kernel pins This allows an independent pinning of kernels for future ARM builds regardless of x86. Probably the way we should have done it from the beginning. * get rid of build-ghcr and build-pipeline related things We are not using the build-pipeline recipe anywhere right now. I think a build-rechunk recipe is good enough for now. I think build-ghcr doesn't make any sense anymore as it's now just a single additional flag. The rechunk recipe with chunkah currently doesn't alter any behavior when run in ghcr so we can delete this. But this will likely change when chunkah implements some form of passing a previous manifest. I want to do a recipe at some point which replaces the general idea of the pipeline recipe and is as close to github as possible. Build -> Rechunk -> Secureboot-> tag + push an image to a local registry bootc install. * do deprecated build-chunked-oci recipe * remove build-pipeline parts of ostree-rechunk * export oci * load rootful recipe currently not used in CI as we are running everything as root. * secureboot * generate-point * gen-sbom * package cache * bootc install * some remaining shebangs best practice to use env bash here instead * push recipe * redo generate-build-tags and tag-images I removed the version input here. This has been broken for probably a very long time, this didn't do anything for months at least, oldest log I could find here: ``` Error: no such object: "aurora:latest" Tags for this Action... latest latest-43.20260424 latest-20260424 43 43-43.20260424 43-20260424 ``` Kernel input is now done through just, so no reason to pass that, no idea why we had that here in the first place. * fix kernel pin for build-rechunk This convenience recipe needs to take all the options from the build one
2026-06-26 22:36:37 -08:00
#!/usr/bin/env bash
set -euxo pipefail
skopeo="echo === skopeo"
if [[ "{{ dry_run }}" -ne 1 ]]; then
echo "$GITHUB_PAT" | podman login -u $GITHUB_USERNAME --password-stdin ghcr.io
skopeo="skopeo"
fi
for image in aurora-nvidia-open aurora-dx-nvidia-open; do
$skopeo copy docker://ghcr.io/ublue-os/${image}:{{ working_tag }} docker://ghcr.io/ublue-os/${image}:{{ stream }}
done