From 16c5488ea9a4754cc8180bc439f1d83d71bf3537 Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 4 Dec 2024 21:17:23 +0000 Subject: [PATCH] Add Accept for oci image type to ext trigger requests --- roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 b/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 index ef296fce..24bc4f50 100644 --- a/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 +++ b/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 @@ -110,17 +110,20 @@ jobs: {% if better_vars.MULTIARCH == 'true' %} multidigest=$(curl -s \ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Accept: application/vnd.oci.image.index.v1+json" \ --header "Authorization: Bearer ${token}" \ "https://ghcr.io/v2/${image}/manifests/${tag}" \ | jq -r 'first(.manifests[].digest)') digest=$(curl -s \ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Accept: application/vnd.oci.image.index.v1+json" \ --header "Authorization: Bearer ${token}" \ "https://ghcr.io/v2/${image}/manifests/${multidigest}" \ | jq -r '.config.digest') {% else %} digest=$(curl -s \ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Accept: application/vnd.oci.image.index.v1+json" \ --header "Authorization: Bearer ${token}" \ "https://ghcr.io/v2/${image}/manifests/${tag}" \ | jq -r '.config.digest')