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
This commit is contained in:
peaklabs-dev
2026-11-02 00:06:48 +01:00
committed by GitHub
parent 9f21022732
commit aefd2cff89
4 changed files with 16 additions and 4 deletions
+4 -1
View File
@@ -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[@]}"
+4 -1
View File
@@ -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:
+4 -1
View File
@@ -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
+4 -1
View File
@@ -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