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