From a361fd371899df849bf081753d6203f917be2f01 Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Sun, 7 Jun 2026 18:15:54 +0200 Subject: [PATCH] fix(ci): add commit hash as org.opencontainers.image.revision label (#2340) This label was previously created by the hhd/legacy-rechunker instead of on the image build process. We are now using the build-chunked-oci and in the near future chunkah which do not mess with the labels. Our changelogs script expects this label to be present in order for the commits since last release to show up. fixes: https://github.com/ublue-os/aurora/issues/2338 --- Containerfile.in | 2 +- Justfile | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Containerfile.in b/Containerfile.in index d5cbfcfd..d7e9a598 100644 --- a/Containerfile.in +++ b/Containerfile.in @@ -45,7 +45,7 @@ ARG FEDORA_MAJOR_VERSION="" ARG IMAGE_NAME="aurora" ARG IMAGE_VENDOR="ublue-os" ARG KERNEL="" -ARG SHA_HEAD_SHORT="dedbeef" +ARG SHA_HEAD_SHORT="" ARG UBLUE_IMAGE_TAG="latest" ARG VERSION="" ARG IMAGE_FLAVOR="" diff --git a/Justfile b/Justfile index 13b8fbf2..4e315f6b 100644 --- a/Justfile +++ b/Justfile @@ -181,6 +181,8 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline 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}") if [[ "${PODMAN}" =~ docker && "${TERM}" == "dumb" ]]; then @@ -209,6 +211,11 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline LABELS+=("--label" "org.opencontainers.image.url=https://getaurora.dev") LABELS+=("--label" "org.opencontainers.image.vendor={{ repo_organization }}") 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 LABELS+=("--label" "ostree.linux=${kernel_release}") echo "::endgroup::"