From aefd2cff897037e930aa3e982061b8f973d7a038 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 29 Oct 2026 23:09:52 +0100 Subject: [PATCH] feat(release): copy the image labels to the release index - ghcr.io reads the description and the license of an image of several platforms from the annotations of its index, not from the labels of each image --- .github/workflows/main.yaml | 5 ++++- .github/workflows/nightly.yaml | 5 ++++- .github/workflows/pull-request.yaml | 5 ++++- .github/workflows/release.yaml | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f0dbd9a07c..61d20419d0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -85,4 +85,7 @@ jobs: for index in "$RUNNER_TEMP"/images/*/index.json; do sources+=("oci-layout://${index%/index.json}@$(jq -r '.manifests[0].digest' "$index")") done - docker buildx imagetools create --tag ghcr.io/coollabsio/coolify:main "${sources[@]}" + labels="$(docker buildx imagetools inspect "${sources[0]}" --format '{{ json .Image.Config.Labels }}' \ + | jq -r 'to_entries[] | "--annotation=index:\(.key)=\(.value)"')" + mapfile -t annotations <<< "$labels" + docker buildx imagetools create "${annotations[@]}" --tag ghcr.io/coollabsio/coolify:main "${sources[@]}" diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index e21e1269f1..688b843a01 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -100,10 +100,13 @@ jobs: for index in "$RUNNER_TEMP"/images/*/index.json; do sources+=("oci-layout://${index%/index.json}@$(jq -r '.manifests[0].digest' "$index")") done + labels="$(docker buildx imagetools inspect "${sources[0]}" --format '{{ json .Image.Config.Labels }}' \ + | jq -r 'to_entries[] | "--annotation=index:\(.key)=\(.value)"')" + mapfile -t annotations <<< "$labels" for repository in ghcr.io/coollabsio/coolify docker.io/coollabsio/coolify; do tags=(--tag "$repository:${TAG#v}") [ "$LINE" != latest ] || tags+=(--tag "$repository:nightly") - docker buildx imagetools create "${tags[@]}" "${sources[@]}" + docker buildx imagetools create "${annotations[@]}" "${tags[@]}" "${sources[@]}" done cdn: diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index a5c13b5ed1..1755e7d97c 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -81,7 +81,10 @@ jobs: for index in "$RUNNER_TEMP"/images/*/index.json; do sources+=("oci-layout://${index%/index.json}@$(jq -r '.manifests[0].digest' "$index")") done - docker buildx imagetools create --tag "ghcr.io/coollabsio/coolify:$TAG" "${sources[@]}" + labels="$(docker buildx imagetools inspect "${sources[0]}" --format '{{ json .Image.Config.Labels }}' \ + | jq -r 'to_entries[] | "--annotation=index:\(.key)=\(.value)"')" + mapfile -t annotations <<< "$labels" + docker buildx imagetools create "${annotations[@]}" --tag "ghcr.io/coollabsio/coolify:$TAG" "${sources[@]}" size: name: Compare size with latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ab98ab102a..2f7819b8f5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -105,8 +105,11 @@ jobs: for index in "$RUNNER_TEMP"/images/*/index.json; do sources+=("oci-layout://${index%/index.json}@$(jq -r '.manifests[0].digest' "$index")") done + labels="$(docker buildx imagetools inspect "${sources[0]}" --format '{{ json .Image.Config.Labels }}' \ + | jq -r 'to_entries[] | "--annotation=index:\(.key)=\(.value)"')" + mapfile -t annotations <<< "$labels" for repository in ghcr.io/coollabsio/coolify docker.io/coollabsio/coolify; do - docker buildx imagetools create --tag "$repository:${TAG#v}" "${sources[@]}" + docker buildx imagetools create "${annotations[@]}" --tag "$repository:${TAG#v}" "${sources[@]}" done - name: Create the GitHub release