mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 21:18:11 -04:00
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:
@@ -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[@]}"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user