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