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
This commit is contained in:
renner 2026-06-07 18:15:54 +02:00 committed by GitHub
parent 91785f1e03
commit a361fd3718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -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=""

View file

@ -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::"